diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 3b4a105..5360f36 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -20,11 +20,3 @@ jobs: run: sudo apt-get install figlet - name: 'Run Tests' run: cd tests && ./commandline_args.sh - - name: 'Set CURRENTCOMMIT const' - run: echo 'const CURRENTCOMMIT* = "${{ github.sha }}"' > ./src/catniplib/global/currentcommit.nim - - name: 'Push changes' - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git commit -am "Automatic build Number update" - git push diff --git a/.gitignore b/.gitignore index a93a910..c13079b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ catnip *.exe *.gz +src/catniplib/global/currentcommit.nim diff --git a/config.nims b/config.nims index 6dde71a..dedd5c9 100644 --- a/config.nims +++ b/config.nims @@ -35,10 +35,12 @@ proc configure() = task release, "Builds the project in release mode": echo "\e[36;1mBuilding\e[0;0m in release mode" + exec &"./tests/git-commit-id.sh" compile(true) task debug, "Builds the project in debug mode": echo "\e[36;1mBuilding\e[0;0m in debug mode" + exec &"./tests/git-commit-id.sh" compile(false) task install_cfg, "Installs the config files": diff --git a/src/catniplib/global/currentcommit.nim b/src/catniplib/global/currentcommit.nim deleted file mode 100644 index c168af7..0000000 --- a/src/catniplib/global/currentcommit.nim +++ /dev/null @@ -1 +0,0 @@ -const CURRENTCOMMIT* = "3c702854eba0be7fb403c1920bec671895b00a5e" diff --git a/tests/git-commit-id.sh b/tests/git-commit-id.sh new file mode 100755 index 0000000..be9fb7f --- /dev/null +++ b/tests/git-commit-id.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo "const CURRENTCOMMIT* = \"$(git rev-parse HEAD)"\"\ > src/catniplib/global/currentcommit.nim