From 641ab244ef640538ce80f235e204252809803f37 Mon Sep 17 00:00:00 2001 From: Andrea Valassi Date: Sat, 28 Sep 2024 11:08:55 +0200 Subject: [PATCH] [install] in .github/workflows/archiver.yml create version_info.dat and push it to the INFO branch --- .github/workflows/archiver.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/archiver.yml b/.github/workflows/archiver.yml index 268cfac088..ee9fbc1f83 100644 --- a/.github/workflows/archiver.yml +++ b/.github/workflows/archiver.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 with: submodules: 'true' - - name: archive + - name: create_tarball run: .github/workflows/archiver.sh - name: release # See https://github.com/softprops/action-gh-release @@ -29,3 +29,22 @@ jobs: VERSION.txt env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: create_infodat + run: python3 .github/workflows/archiver.py TMP_version_info.dat + - name: commit_infodat + run: | + git config user.name github-actions + git config user.email github-actions@github.com + # Note: 'git checkout INFO' would fails if it found version_info.dat + git checkout INFO + mv TMP_version_info.dat version_info.dat + if [ -z "$(git status --porcelain version_info.dat)" ]; then + echo "Nothing to commit" + else + echo "Commit and push version_info.dat" + echo "Update version_info.dat" > msg.txt + echo "" >> msg.txt + git diff version_info.dat | tail --lines=+6 >> msg.txt + git commit -F msg.txt version_info.dat + git push + fi