From 083d087d54a0b0349ed8dc0c6bc5f37118252730 Mon Sep 17 00:00:00 2001 From: Benoit Lavenier <benoit.lavenier@e-is.pro> Date: Mon, 13 Apr 2020 21:21:21 +0200 Subject: [PATCH] Fix release script --- doc/development_guide.md | 2 +- gulpfile.js | 15 ++++++++++----- install.sh | 2 +- scripts/release.sh | 4 ++-- www/js/config.js | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/development_guide.md b/doc/development_guide.md index 0965ccd5..162087e7 100644 --- a/doc/development_guide.md +++ b/doc/development_guide.md @@ -27,7 +27,7 @@ To build Cesium, you will have to: 3. Installing node build tools, as global dependencies: ```bash - npm install -g yarn gulp cordova @ionic/cli + npm install -g yarn gulp cordova @ionic/cli web-ext ``` ## Get the source code and dependencies diff --git a/gulpfile.js b/gulpfile.js index 11eca3f7..2c83a78f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -269,9 +269,7 @@ function pluginSass() { function webClean() { return del([ - './dist/web/www', - './dist/web/ext', - './dist/web/build' + './dist/web/www' ]); } @@ -694,10 +692,17 @@ function webExtensionZip() { function webBuildSuccess(done) { var version = JSON.parse(fs.readFileSync('./package.json', 'utf8')).version; - log(colors.green("Web artifacts created at: 'dist/web/build/cesium-v" + version + "-web.zip' and 'dist/web/build/cesium-v" + version + "-extension.zip'")); + log(colors.green("Web artifact created at: 'dist/web/build/cesium-v" + version + "-web.zip'")); done(); } +function webExtBuildSuccess(done) { + var version = JSON.parse(fs.readFileSync('./package.json', 'utf8')).version; + log(colors.green("Web extension artifact created at: 'dist/web/build/cesium-v" + version + "-extension.zip'")); + done(); +} + + /* -------------------------------------------------------------------------- -- Define gulp public tasks --------------------------------------------------------------------------*/ @@ -757,7 +762,7 @@ gulp.task('webExtensionClean', [], webExtensionClean); gulp.task('webExtensionCopyFiles', ['webExtensionClean', 'webCleanUnusedDirectories'], webExtensionCopyFiles); gulp.task('webExtensionZip', ['webExtensionCopyFiles'], webExtensionZip); -gulp.task('webBuild', ['webZip', 'webExtensionZip'], webBuildSuccess); +gulp.task('webBuild', ['webZip'], webBuildSuccess); gulp.task('build:web', ['webBuild']); // = webBuild gulp.task('webExtBuild', ['webExtensionZip']); diff --git a/install.sh b/install.sh index a10f81b8..50feafe4 100755 --- a/install.sh +++ b/install.sh @@ -15,7 +15,7 @@ if [ "_$CESIUM_DIR" = "_" ]; then fi latest_version() { - echo "v1.6.2-alpha" #lastest + echo "v1.6.2" #lastest } api_release_url() { diff --git a/scripts/release.sh b/scripts/release.sh index 82740798..72875bad 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -34,7 +34,7 @@ fi echo "Current Android version: $currentAndroid" # Check version format -if [[ ! $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ || ! $3 =~ ^[0-9]+$ ]]; then +if [[ ! $2 =~ ^[0-9]+.[0-9]+.[0-9]+(-(alpha|beta|rc)[-0-9]*)?$ || ! $3 =~ ^[0-9]+$ ]]; then echo "Wrong version format" echo "Usage:" echo " > ./release.sh [pre|rel] <version> <android-version> <release_description>" @@ -117,7 +117,7 @@ cd ${PROJECT_DIR} || exit 1 # Run web build gulp config --env default -gulp webBuild --release +gulp webBuild webExtBuild --release if [[ $? -ne 0 ]]; then exit 1 fi diff --git a/www/js/config.js b/www/js/config.js index 835f378d..b324efb5 100644 --- a/www/js/config.js +++ b/www/js/config.js @@ -98,7 +98,7 @@ angular.module("cesium.config", []) } }, "version": "1.6.2-alpha", - "build": "2020-04-13T18:04:09.778Z", + "build": "2020-04-13T18:21:09.482Z", "newIssueUrl": "https://git.duniter.org/clients/cesium-grp/cesium/issues/new" }) -- GitLab