Identify and flag nightly builds. If a new version is released as stable they will be able to recognize that there's a new version available.

This commit is contained in:
Martín Lucas Golini
2024-10-19 17:29:18 -03:00
parent 1914488336
commit b9667b75a3
7 changed files with 60 additions and 36 deletions

View File

@@ -0,0 +1,13 @@
#!/bin/bash
cd "$(dirname "$0")" || exit
COMMIT_NUMBER=$(git rev-list "$(git tag --sort=-creatordate | grep ecode | sed -n 1p)"..HEAD --count) || exit
FILE_PATH="../../src/tools/ecode/version.hpp"
if [[ "$OSTYPE" == "darwin"* || "$OSTYPE" == "freebsd"* ]]; then
sed -i '' "s/#define ECODE_COMMIT_NUMBER [0-9]\+/#define ECODE_COMMIT_NUMBER $COMMIT_NUMBER/" "$FILE_PATH"
else
sed -i "s/#define ECODE_COMMIT_NUMBER [0-9]\+/#define ECODE_COMMIT_NUMBER $COMMIT_NUMBER/" "$FILE_PATH"
fi