mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
* Update patch_commit_number.sh FreeBSD does not include Perl in the base system. Since the workflow installs gsed, why not use it instead? To use Perl, you would need to install perl5 anyway. * Update patch_commit_number.sh * Update patch_commit_number.sh * OpenBSD * OpenBSD * OpenBSD * Update build.app.sh * Update build.app.sh * Update build.app.sh * Delete projects/openbsd directory * Update build.app.sh * Update build.app.sh
20 lines
639 B
Bash
20 lines
639 B
Bash
#!/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"
|
|
|
|
case "$OSTYPE" in
|
|
darwin*)
|
|
perl -i -pe "s/#define ECODE_COMMIT_NUMBER [0-9]+/#define ECODE_COMMIT_NUMBER $COMMIT_NUMBER/" "$FILE_PATH"
|
|
;;
|
|
freebsd*|openbsd*|netbsd*|dragonfly*|solaris*)
|
|
gsed -i "s/#define ECODE_COMMIT_NUMBER [0-9]\+/#define ECODE_COMMIT_NUMBER $COMMIT_NUMBER/" "$FILE_PATH"
|
|
;;
|
|
*)
|
|
sed -i "s/#define ECODE_COMMIT_NUMBER [0-9]\+/#define ECODE_COMMIT_NUMBER $COMMIT_NUMBER/" "$FILE_PATH"
|
|
;;
|
|
esac
|