mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-23 03:02:50 +03:00
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:
13
projects/scripts/patch_commit_number.sh
Normal file
13
projects/scripts/patch_commit_number.sh
Normal 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
|
||||
Reference in New Issue
Block a user