feat(CI): add commit hashes to the automatic SQL import (#1516)
This commit is contained in:
@@ -6,6 +6,8 @@ source "$CURRENT_PATH/../bash_shared/includes.sh"
|
||||
|
||||
UPDATES_PATH="$AC_PATH_ROOT/data/sql/updates/"
|
||||
|
||||
COMMIT_HASH=
|
||||
|
||||
function import() {
|
||||
db=$1
|
||||
folder="db_"$db
|
||||
@@ -97,6 +99,13 @@ function import() {
|
||||
echo "DROP PROCEDURE IF EXISTS \`updateDb\`;" >> "$newFile";
|
||||
fi;
|
||||
|
||||
currentHash="$(git log --diff-filter=A "$entry" | grep "^commit " | sed -e 's/commit //')"
|
||||
|
||||
if [[ "$COMMIT_HASH" != *"$currentHash"* ]]
|
||||
then
|
||||
COMMIT_HASH="$COMMIT_HASH $currentHash"
|
||||
fi
|
||||
|
||||
rm $entry;
|
||||
|
||||
oldDate=$dateToday
|
||||
|
||||
Reference in New Issue
Block a user