Merge pull request #2672 from stenzek/build-time-version
CI: Set version in rc files at build time
This commit is contained in:
commit
67b4a46895
|
@ -46,6 +46,15 @@ jobs:
|
||||||
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
||||||
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
||||||
|
|
||||||
|
- name: Update RC version fields
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd src\scmversion
|
||||||
|
call update_rc_version.bat
|
||||||
|
cd ..\..
|
||||||
|
git update-index --assume-unchanged src/duckstation-qt/duckstation-qt.rc
|
||||||
|
git update-index --assume-unchanged src/duckstation-nogui/duckstation-nogui.rc
|
||||||
|
|
||||||
- name: Compile x64 release build
|
- name: Compile x64 release build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
|
@ -108,6 +117,14 @@ jobs:
|
||||||
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
echo #define SCM_RELEASE_TAGS {"latest", "preview"} >> src/scmversion/tag.h
|
||||||
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
||||||
|
|
||||||
|
- name: Update RC version fields
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
cd src\scmversion
|
||||||
|
call update_rc_version.bat
|
||||||
|
cd ..\..
|
||||||
|
git update-index --assume-unchanged src/duckstation-qt/duckstation-qt.rc
|
||||||
|
git update-index --assume-unchanged src/duckstation-nogui/duckstation-nogui.rc
|
||||||
|
|
||||||
- name: Compile arm64 release build
|
- name: Compile arm64 release build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
|
@ -23,11 +23,5 @@ ECHO const char* g_scm_tag_str = "%TAG%";
|
||||||
ECHO const char* g_scm_date_str = "%CDATE%";
|
ECHO const char* g_scm_date_str = "%CDATE%";
|
||||||
)>%VERSIONFILE%
|
)>%VERSIONFILE%
|
||||||
|
|
||||||
powershell -Command "(gc ..\duckstation-qt\duckstation-qt.rc) -replace '1,0,0,1', '"%TAG:~0,1%","%TAG:~2,1%","%TAG:~4,4%",0' | Out-File -encoding ASCII ..\duckstation-qt\duckstation-qt.rc"
|
|
||||||
powershell -Command "(gc ..\duckstation-qt\duckstation-qt.rc) -replace '1.0.0.1', '"%TAG:~0,1%"."%TAG:~2,1%"."%TAG:~4,4%"' | Out-File -encoding ASCII ..\duckstation-qt\duckstation-qt.rc"
|
|
||||||
|
|
||||||
powershell -Command "(gc ..\duckstation-nogui\duckstation-nogui.rc) -replace '1,0,0,1', '"%TAG:~0,1%","%TAG:~2,1%","%TAG:~4,4%",0' | Out-File -encoding ASCII ..\duckstation-nogui\duckstation-nogui.rc
|
|
||||||
powershell -Command "(gc ..\duckstation-nogui\duckstation-nogui.rc) -replace '1.0.0.1', '"%TAG:~0,1%"."%TAG:~2,1%"."%TAG:~4,4%"' | Out-File -encoding ASCII ..\duckstation-nogui\duckstation-nogui.rc"
|
|
||||||
|
|
||||||
EXIT
|
EXIT
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
FOR /F "tokens=* USEBACKQ" %%g IN (`git describe --tags --dirty --exclude latest --exclude preview --exclude play-store-release`) do (SET "TAG=%%g")
|
||||||
|
|
||||||
|
powershell -Command "(gc ..\duckstation-qt\duckstation-qt.rc) -replace '1,0,0,1', '"%TAG:~0,1%","%TAG:~2,1%","%TAG:~4,4%",0' | Out-File -encoding ASCII ..\duckstation-qt\duckstation-qt.rc"
|
||||||
|
powershell -Command "(gc ..\duckstation-qt\duckstation-qt.rc) -replace '1.0.0.1', '"%TAG:~0,1%"."%TAG:~2,1%"."%TAG:~4,4%"' | Out-File -encoding ASCII ..\duckstation-qt\duckstation-qt.rc"
|
||||||
|
|
||||||
|
powershell -Command "(gc ..\duckstation-nogui\duckstation-nogui.rc) -replace '1,0,0,1', '"%TAG:~0,1%","%TAG:~2,1%","%TAG:~4,4%",0' | Out-File -encoding ASCII ..\duckstation-nogui\duckstation-nogui.rc
|
||||||
|
powershell -Command "(gc ..\duckstation-nogui\duckstation-nogui.rc) -replace '1.0.0.1', '"%TAG:~0,1%"."%TAG:~2,1%"."%TAG:~4,4%"' | Out-File -encoding ASCII ..\duckstation-nogui\duckstation-nogui.rc"
|
Loading…
Reference in New Issue