diff --git a/.github/workflows/deploy_docker.yml b/.github/workflows/deploy_docker.yml index 3ee95da8..d763567c 100644 --- a/.github/workflows/deploy_docker.yml +++ b/.github/workflows/deploy_docker.yml @@ -33,10 +33,18 @@ jobs: script: | docker compose -f docker-compose.prod.yml --env-file=.env.prod down --remove-orphans --rmi all - - name: checkout + - name: Checkout Code uses: actions/checkout@v4 - - name: 'Create main.cf and master.cf file' + - name: Get Git Commit Hash + id: git_info + run: echo "GIT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV + + - name: Get Branch Name + id: branch_name + run: echo "GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV + + - name: Create main.cf and master.cf File run: | echo "${{ vars.POSTFIX_MAIN_CF }}" > main.cf echo "${{ vars.POSTFIX_MASTER_CF }}" > master.cf @@ -80,7 +88,7 @@ jobs: source: "master.cf" target: /home/${{ vars.VM_USERNAME }}/postfix-config/ - - name: SSH to VM and create .env.prod + - name: SSH to VM and Create .env.prod uses: appleboy/ssh-action@v1.0.3 with: host: ${{ vars.VM_HOST }} @@ -138,6 +146,9 @@ jobs: echo "SERVER_IMAGE_TAG=${{ inputs.server_image_tag }}" >> .env.prod echo "CLIENT_IMAGE_TAG=${{ inputs.client_image_tag }}" >> .env.prod + + echo "GIT_COMMIT=${{ env.GIT_COMMIT }}" >> .env.prod + echo "GIT_BRANCH=${{ env.GIT_BRANCH }}" >> .env.prod - name: SSH to VM and Execute Docker-Compose Up uses: appleboy/ssh-action@v1.0.3 diff --git a/client/public/generate-runtime-env.js b/client/public/generate-runtime-env.js index 0b31b1f8..a0200afb 100644 --- a/client/public/generate-runtime-env.js +++ b/client/public/generate-runtime-env.js @@ -9,6 +9,8 @@ const ALLOWED_ENVIRONMENT_VARIABLES = [ 'CHAIR_URL', 'PRIVACY', 'IMPRINT', + 'GIT_COMMIT', + 'GIT_BRANCH', // environments with defaults 'ALLOW_SUGGESTED_TOPICS', 'DEFAULT_SUPERVISOR_UUID', diff --git a/client/src/config/global.ts b/client/src/config/global.ts index 9259bf66..6ff1d9d9 100644 --- a/client/src/config/global.ts +++ b/client/src/config/global.ts @@ -22,6 +22,11 @@ export const GLOBAL_CONFIG: IGlobalConfig = { allow_suggested_topics: (getEnvironmentVariable('ALLOW_SUGGESTED_TOPICS') || 'true') === 'true', + git: { + commit: getEnvironmentVariable('GIT_COMMIT') || 'unknown', + branch: getEnvironmentVariable('GIT_BRANCH') || 'unknown' + }, + genders: getEnvironmentVariable>('GENDERS', true) || { MALE: 'Male', FEMALE: 'Female', diff --git a/client/src/config/types.ts b/client/src/config/types.ts index 12ff93ac..1e285baa 100644 --- a/client/src/config/types.ts +++ b/client/src/config/types.ts @@ -13,6 +13,11 @@ export interface IGlobalConfig { study_degrees: Record languages: Record + git: { + commit: string + branch: string + } + thesis_types: Record< string, { diff --git a/client/src/pages/AboutPage/AboutPage.tsx b/client/src/pages/AboutPage/AboutPage.tsx index b6f96622..0f4e19cc 100644 --- a/client/src/pages/AboutPage/AboutPage.tsx +++ b/client/src/pages/AboutPage/AboutPage.tsx @@ -2,6 +2,7 @@ import { Anchor, Center, Image, List, Stack, Text, Title } from '@mantine/core' import flowchart from './flowchart.svg' import { usePageTitle } from '../../hooks/theme' import PublicArea from '../../app/layout/PublicArea/PublicArea' +import { GLOBAL_CONFIG } from '../../config/global' const AboutPage = () => { usePageTitle('About') @@ -11,15 +12,37 @@ const AboutPage = () => { ThesisTrack - ThesisTrack is a web-based thesis management system designed to streamline the thesis - process in academic institutions by integrating essential stages into a single platform. - Developed to address challenges in managing large volumes of theses, it facilitates - seamless interactions between students, advisors, and supervisors. Key features include a - centralized application process, guided workflows for thesis writing, automated - notifications, and a comprehensive Gantt chart for tracking progress. By consolidating - communication, feedback, and file management, ThesisTrack enhances transparency, reduces - administrative burdens, and fosters efficient thesis supervision and assessment. + ThesisTrack addresses inefficient manual thesis management processes at large universities + through a web-based platform. The system digitizes the entire lifecycle from student + applications to final grading, serving three key stakeholders: supervisors (professors), + advisors (doctoral candidates), and students. Key features include: + + + A structured application system allowing students to apply directly for specific thesis + topics + + + Centralized document management for proposals, theses, and presentations + + Built-in feedback mechanisms for proposal and thesis review + + A Gantt chart overview showing timelines and progress across multiple theses + + + Role-based access control with specific permissions for students, advisors, and + supervisors + + Automated notifications for important milestones and updates + + Project Managers + + + + Stephan Krusche + + + Contributors @@ -47,6 +70,15 @@ const AboutPage = () => {
+ Git Information + + + Branch: {GLOBAL_CONFIG.git.branch} + + + Commit: {GLOBAL_CONFIG.git.commit} + +
) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index bfbd23a6..3a8f209e 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -74,6 +74,8 @@ services: - CALDAV_USERNAME - CALDAV_PASSWORD - SCIENTIFIC_WRITING_GUIDE + - GIT_COMMIT + - GIT_BRANCH networks: - thesis-track-network @@ -109,6 +111,8 @@ services: - APPLICATION_TITLE - CHAIR_NAME - CHAIR_URL + - GIT_COMMIT + - GIT_BRANCH depends_on: - server networks: diff --git a/server/build.gradle b/server/build.gradle index e2177954..f5920a74 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -1,8 +1,6 @@ - plugins { id "java" id "idea" -// id "com.gorylenko.gradle-git-properties" version "2.4.2" id "com.github.andygoossens.modernizer" version "1.10.0" id "org.springframework.boot" version "${spring_boot_version}" id "io.spring.dependency-management" version "1.1.6"