Skip to content
Snippets Groups Projects
Commit cd6cf5bd authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

Link release script with github (if credentials found)

parent 4099b166
No related branches found
No related tags found
No related merge requests found
...@@ -55,11 +55,11 @@ case "$1" in ...@@ -55,11 +55,11 @@ case "$1" in
dirname=`pwd` dirname=`pwd`
curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/web/build/cesium-web-$current.zip $upload_url?name=cesium-v$current-web.zip curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/web/build/cesium-web-$current.zip $upload_url?name=cesium-v$current-web.zip
curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/firefoxos/build/package.zip $upload_url?name=cesium-v$current-firefoxos.zip curl -i -u $2 -H 'Content-Type: application/zip' -T $dirname/platforms/firefoxos/build/package.zip $upload_url?name=cesium-v$current-firefoxos.zip
curl -i -u $2 -H 'Content-Type: application/vnd.android.package-archive' -T $dirname/platforms/android/build/outputs/apk/android-release.apk $upload_url?name=cesium-v$current-android.zip curl -i -u $2 -H 'Content-Type: application/vnd.android.package-archive' -T $dirname/platforms/android/build/outputs/apk/android-release.apk $upload_url?name=cesium-v$current-android.apk
echo "Successfully uploading files" echo "Successfully uploading files"
release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+" | grep -oP "https://api.github.com/repos/[a-z0-9/.]+"` release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+" | grep -oP "https://api.github.com/repos/[a-z0-9/.]+"`
echo " Release address: $release_url" echo " -> Release url: $release_url"
else else
echo "Wrong arguments" echo "Wrong arguments"
echo "Usage:" echo "Usage:"
......
...@@ -48,15 +48,20 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then ...@@ -48,15 +48,20 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then
ionic build firefoxos --release ionic build firefoxos --release
gulp build:web --release gulp build:web --release
if [[ $4 =~ ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ ]]; then
./github.sh $1 $2
fi
echo "**********************************" echo "**********************************"
echo "* Build release $2 sucees !" echo "* Build release succeed !"
echo "**********************************" echo "**********************************"
else else
echo "Wrong version format" echo "Wrong version format"
echo "Usage:" echo "Usage:"
echo " > ./release.sh [pre|rel] <version> <android-version>" echo " > ./release.sh [pre|rel] <version> <android-version> <github_credentials>"
echo "with:" echo "with:"
echo " - version: x.y.z" echo " version: x.y.z"
echo " - android-version: nnn" echo " android-version: nnn"
echo " github_credentials: user:password (a valid GitHub user account)"
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment