Files
linux-workspace/scripts/changes.sh
2020-11-03 20:02:36 +01:00

18 lines
383 B
Bash
Executable File

#!/bin/bash
# process changes from last commit
set -u
VERSION_FILE=$WORKSPACE/var/version
last_version=$(cat $VERSION_FILE 2> /dev/null)
current_version=$(git -C $WORKSPACE rev-parse HEAD)
if [[ "$last_version" != "$current_version" ]]; then
echo "Git version changed. Running changing scripts"
$WORKSPACE/scripts/git-config.sh
echo "$current_version" > $VERSION_FILE
fi