From 2d7a078849f3e0f0e136e19e85caf05de8000e05 Mon Sep 17 00:00:00 2001 From: Benoit Lavenier <benoit.lavenier@e-is.pro> Date: Fri, 27 Dec 2019 21:08:11 +0100 Subject: [PATCH] [fix] Fix tag and push tag --- .gitmodules | 6 +++--- scripts/release.sh | 32 +++++++++++++++++++------------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3357a51f..c8c395c2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "dist/desktop"] path = dist/desktop url = git@git.duniter.org:clients/cesium-grp/cesium-desktop.git -#[submodule "android"] -# path = platforms/android -# url = git@git.duniter.org:clients/cesium-grp/cesium-android.git +[submodule "android"] + path = platforms/android + url = git@git.duniter.org:clients/cesium-grp/cesium-android.git diff --git a/scripts/release.sh b/scripts/release.sh index 5e27412e..6981ad45 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -77,12 +77,19 @@ if [[ $? -ne 0 ]]; then exit 1 fi +cd ${PROJECT_DIR} +git submodule init && git submodule sync && git submodule update --remote --merge +if [[ $? -ne 0 ]]; then + echo "Unable to sync git submodule. Could not build desktop version" + exit 1 +fi + echo "----------------------------------" echo "- Compiling sources..." echo "----------------------------------" -# Compile gulp config build --env default_fr + echo "----------------------------------" echo "- Building Android artifact..." echo "----------------------------------" @@ -96,6 +103,7 @@ if [[ -f "${APK_RELEASE_FILE}" ]]; then cp ${APK_RELEASE_FILE} ${DIST_ANDROID}/${PROJECT_NAME}-v${current}-android.apk fi; + echo "----------------------------------" echo "- Building web artifact..." echo "----------------------------------" @@ -104,6 +112,7 @@ if [[ $? -ne 0 ]]; then exit 1 fi + echo "----------------------------------" echo "- Executing git push, with tag: v$2" echo "----------------------------------" @@ -127,13 +136,15 @@ if [[ $? -ne 0 ]]; then fi # Commit android project -#cd ${PROJECT_DIR}/platforms/android -#git reset HEAD -#git add -A -#git commit -m "v$2" && git tag "v$2" && git push -#if [[ $? -ne 0 ]]; then -# exit 1 -#fi +cd ${PROJECT_DIR}/platforms/android +git reset HEAD +git add -A +git commit -m "v$2" +git tag -f -a "v$2" -m "${description}" +git push origin "v$2" +if [[ $? -ne 0 ]]; then + exit 1 +fi echo "**********************************" echo "* Uploading artifacts to Github..." @@ -152,11 +163,6 @@ echo "----------------------------------" echo "- Building desktop artifacts..." echo "----------------------------------" -git submodule init && git submodule sync && git submodule update --remote --merge -if [[ $? -ne 0 ]]; then - echo "Unable to sync git submodule. Could not build desktop version" - exit 1 -fi if [[ -d "${PROJECT_DIR}/dist/desktop" ]]; then cd "${PROJECT_DIR}/dist/desktop" -- GitLab