2022-05-03 12:15:57 +03:00
|
|
|
COMMIT=$(git rev-parse HEAD)
|
|
|
|
VERSION="$1"
|
|
|
|
|
|
|
|
if [ "$VERSION" = "" ]
|
|
|
|
then
|
|
|
|
echo "Please supply a version tag e.g \`./rel/prepare_release.sh v1.5.0\`"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2022-05-03 15:16:04 +03:00
|
|
|
if [ "$GITHUB_WORKSPACE" != "" ]
|
|
|
|
then
|
2022-05-27 12:06:38 +03:00
|
|
|
ls $GITHUB_WORKSPACE
|
2022-05-27 11:19:37 +03:00
|
|
|
TARGET_FOLDER=$GITHUB_WORKSPACE/priv
|
2022-05-03 15:16:04 +03:00
|
|
|
else
|
2022-05-27 11:19:37 +03:00
|
|
|
TARGET_FOLDER=$(pwd)/priv
|
2022-05-03 15:16:04 +03:00
|
|
|
fi
|
2022-05-03 12:15:57 +03:00
|
|
|
|
2022-05-03 15:23:32 +03:00
|
|
|
echo "{\"version\": \"$VERSION\", \"commit\": \"$COMMIT\"}" > $TARGET_FOLDER/version.json
|
2022-05-03 15:33:51 +03:00
|
|
|
|
|
|
|
echo "ADDED VERSION INFO TO $TARGET_FOLDER/version.json"
|
|
|
|
cat $TARGET_FOLDER/version.json
|