mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[no-issue] Parallel run e2e and e2e common action refactoring (#4702)
This commit is contained in:
61
scripts/release/release.sh
Executable file
61
scripts/release/release.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
eval GNU=false
|
||||
|
||||
set -e
|
||||
TEMP=".tmp";
|
||||
|
||||
show_help() {
|
||||
echo "Usage: update-generator.sh"
|
||||
echo ""
|
||||
echo "-t or --token Github ouath token"
|
||||
echo "-v or --version version to bump"
|
||||
echo "-gnu for gnu"
|
||||
}
|
||||
|
||||
gnu_mode() {
|
||||
echo "====== GNU MODE ====="
|
||||
GNU=true
|
||||
}
|
||||
|
||||
token() {
|
||||
TOKEN=$1
|
||||
}
|
||||
|
||||
version() {
|
||||
VERSION=$1
|
||||
}
|
||||
|
||||
release() {
|
||||
rm -rf $TEMP;
|
||||
git clone https://$TOKEN@github.com/$1.git $TEMP
|
||||
cd $TEMP
|
||||
git checkout development
|
||||
|
||||
if $GNU; then
|
||||
./scripts/update-version.sh -gnu -v $VERSION
|
||||
else
|
||||
./scripts/update-version.sh -v $VERSION
|
||||
fi
|
||||
|
||||
git add .
|
||||
git commit -m "Release $VERSION"
|
||||
git push -u origin development
|
||||
|
||||
curl -H "Authorization: token $TOKEN" -X POST -d '{"body":"Release ADF version '$VERSION'","head":"'development'","base":"master","title":"Release ADF version '$VERSION'"}' https://api.github.com/repos/$1/pulls
|
||||
rm -rf $TEMP;
|
||||
}
|
||||
|
||||
while [[ $1 == -* ]]; do
|
||||
case "$1" in
|
||||
-h|--help|-\?) show_help; exit 0;;
|
||||
-v|--version|-\?) version $2; shift 2;;
|
||||
-gnu) gnu_mode; shift;;
|
||||
-t|--token) token $2; shift 2;;
|
||||
-*) echo "invalid option: $1" 1>&2; show_help; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
release 'Alfresco/alfresco-js-api'
|
||||
release 'Alfresco/generator-ng2-alfresco-app'
|
||||
release 'Alfresco/alfresco-ng2-components'
|
Reference in New Issue
Block a user