Automatic changes
Reload some script after changing git hash
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
/tmp/
|
/tmp/
|
||||||
/opt/bin/*
|
/opt/bin/*
|
||||||
/opt/*
|
/opt/*
|
||||||
|
/var/version
|
||||||
.mypy_cache/
|
.mypy_cache/
|
||||||
|
|
||||||
!/**/.gitkeep
|
!/**/.gitkeep
|
||||||
|
|||||||
1
rc/version.sh
Normal file
1
rc/version.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
$WORKSPACE/scripts/changes.sh
|
||||||
17
scripts/changes.sh
Executable file
17
scripts/changes.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/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 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
|
||||||
|
|
||||||
0
var/.gitkeep
Normal file
0
var/.gitkeep
Normal file
Reference in New Issue
Block a user