From 51d3142b021589eadb9f6d94c608180ef2cd063e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 May 2024 14:22:27 +0000 Subject: [PATCH 1/4] Automatic build Number update --- src/catniplib/global/currentcommit.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catniplib/global/currentcommit.nim b/src/catniplib/global/currentcommit.nim index c168af7..e1f4165 100644 --- a/src/catniplib/global/currentcommit.nim +++ b/src/catniplib/global/currentcommit.nim @@ -1 +1 @@ -const CURRENTCOMMIT* = "3c702854eba0be7fb403c1920bec671895b00a5e" +const CURRENTCOMMIT* = "215b446859529decaf500ef10c8f63cd48cb0572" From 64a529b2cd44525cce800cb129d398071e1865cd Mon Sep 17 00:00:00 2001 From: yuki Date: Thu, 9 May 2024 22:42:37 +0800 Subject: [PATCH 2/4] Changed .gitignore to no longer include the current commit file. --- .gitignore | 1 + src/catniplib/global/currentcommit.nim | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 src/catniplib/global/currentcommit.nim 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/src/catniplib/global/currentcommit.nim b/src/catniplib/global/currentcommit.nim deleted file mode 100644 index e1f4165..0000000 --- a/src/catniplib/global/currentcommit.nim +++ /dev/null @@ -1 +0,0 @@ -const CURRENTCOMMIT* = "215b446859529decaf500ef10c8f63cd48cb0572" From edf3921d41ec2e42f444964f1a211d827d6598e4 Mon Sep 17 00:00:00 2001 From: yuki Date: Thu, 9 May 2024 22:44:23 +0800 Subject: [PATCH 3/4] Redid how the version system works. --- config.nims | 2 ++ tests/git-commit-id.sh | 2 ++ 2 files changed, 4 insertions(+) create mode 100755 tests/git-commit-id.sh 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/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 From c258bedb22fa36f7ea236ec6a4fac0459b569d0d Mon Sep 17 00:00:00 2001 From: yuki Date: Thu, 9 May 2024 22:46:18 +0800 Subject: [PATCH 4/4] Update build-test.yml Removed the git commit parts. --- .github/workflows/build-test.yml | 8 -------- 1 file changed, 8 deletions(-) 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