diff --git a/platforms/desktop b/platforms/desktop index ac146f04421e193bbd68c3947b76ed62daddc386..727be4db2763850edb674499c103a3c309b3727e 160000 --- a/platforms/desktop +++ b/platforms/desktop @@ -1 +1 @@ -Subproject commit ac146f04421e193bbd68c3947b76ed62daddc386 +Subproject commit 727be4db2763850edb674499c103a3c309b3727e diff --git a/release.sh b/release.sh index fba565dccb92ae4ad8da3654cce6791f93476840..05330d0df1c43ee0fa8e0d56a257cb5ba554df19 100755 --- a/release.sh +++ b/release.sh @@ -36,13 +36,31 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then ;; esac + # force nodejs version to 5 + if [ -d "$NVM_DIR" ]; then + . $NVM_DIR/nvm.sh + nvm use 5 + else + echo "nvm (Node version manager) not found (directory $NVM_DIR not found). Please install, and retry" + exit -1 + fi + # Update config file gulp config --env default_fr + + echo "----------------------------------" + echo "- Building Android artifact..." + echo "----------------------------------" # Build assets for mobile device ionic build android --release + #ionic build firefoxos --release + echo "----------------------------------" + echo "- Building web artifact..." + echo "----------------------------------" + # Update config file gulp config --env default gulp build:web --release @@ -50,6 +68,10 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then #cd platforms/ubuntu/native/cesium; debuild cd $DIRNAME + echo "----------------------------------" + echo "- Executing git push, with tag: v$2" + echo "----------------------------------" + # Commit git reset HEAD git add package.json config.xml install.sh www/js/config.js @@ -58,19 +80,50 @@ if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then git push - echo "**********************************" - echo "* Build release succeed !" - echo "**********************************" - if [[ $4 =~ ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$ && "_$5" != "_" ]]; then + echo "**********************************" + echo "* Uploading artifacts to Github..." + echo "**********************************" + ./github.sh $1 $4 "'"$5"'" + + echo "----------------------------------" + echo "- Building desktop versions..." + echo "----------------------------------" + + git submodule update --init + git submodule sync + cd platforms/desktop + + # Exclude Windows - TODO FIXME (not enough space in BL directories) + EXPECTED_ASSETS="cesium-desktop-v$2-linux-x64.deb +cesium-desktop-v$2-linux-x64.tar.gz" + + ./release.sh $2 + + # back to nodejs version 5 + cd $DIRNAME + nvm use 5 + + echo "**********************************" + echo "* Build release succeed !" + echo "**********************************" else + + echo "**********************************" + echo "* Build release succeed !" + echo "**********************************" + echo " WARN - missing arguments: " echo " user:password 'release_description'" echo echo " Binaries files NOT sending to github repository" echo " Please run:" - echo " > ./github.sh pre|rel user:password 'release_description'" + echo " > ./github.sh pre|rel user:password 'release_description'" + echo + echo " Desktop artifact are NOT build" + echo " Please run:" + echo " > platforms/desktop/release.sh <version>" echo fi