alfresco-content-app/scripts/update-commit-sha.sh
davidcanonieto 7ffecc546c
[ACA-3317] Show app current deployed commit in About Page (#1472)
* [ACA-3317] Show app current deployed commit in About Page

* Fix script

* Fix script param

* Remove commit

* Update proxy.conf.js
2020-05-20 13:15:31 +01:00

30 lines
663 B
Bash
Executable File

#!/usr/bin/env bash
eval GNU=false
show_help() {
echo "Usage: update-commit-sha.sh"
echo ""
echo "-gnu for gnu"
}
gnu_mode() {
echo "====== GNU MODE ====="
GNU=true
}
while [[ $1 == -* ]]; do
case "$1" in
-h|--help|-\?) show_help; exit 0;;
-gnu) gnu_mode; shift;;
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
esac
done
npm install @alfresco/adf-cli@alpha
if $GNU; then
./node_modules/@alfresco/adf-cli/bin/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
else
./node_modules/@alfresco/adf-cli/bin/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)" --skipGnu
fi