From 246de09a43442e7859494286072429949b8e5c80 Mon Sep 17 00:00:00 2001 From: Malte Brunnlieb Date: Sun, 26 Sep 2021 12:08:59 +0200 Subject: [PATCH] fixed deployment --- deploy.sh | 30 ++++++++++++++++++------------ pom.xml | 10 ++++++---- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/deploy.sh b/deploy.sh index 66f3745b9a..2c7a159eb1 100644 --- a/deploy.sh +++ b/deploy.sh @@ -121,19 +121,25 @@ function doRunCommand() { # check preconditions if [ "$DEPLOY_UPDATESITE" = "stable" ] && [ -d "../gh-pages" ] then - cd ../gh-pages - CHANGE_LIST=$(git diff --shortstat && git status --porcelain) - if [ ! -z "$CHANGE_LIST" ] - then - echo "../gh-pages is not clean" - doAskQuestion "Should I cleanup?" # will exit if no - doRunCommand "git reset --hard HEAD" - doRunCommand "git clean -xf" - doRunCommand "git pull" - fi - cd "$SCRIPT_PATH" + cd ../gh-pages + if [[ $(git diff --shortstat && git status --porcelain) ]] + then + echo "../gh-pages is prepared" + else + echo "../gh-pages is not clean" + doAskQuestion "Should I cleanup?" # will exit if no + doRunCommand "git reset --hard HEAD" + doRunCommand "git clean -xf" + doRunCommand "git pull" + fi + cd "$SCRIPT_PATH" else - echo "Not detected cloned gh-pages branch in ../gh-pages folder." + echo "Not detected cloned gh-pages branch in ../gh-pages folder." + ORIGIN="$(git config --get remote.origin.url)" + case "$ORIGIN" in + *devonfw/cobigen*) doAskQuestion "Should I clone gh-pages from $ORIGIN" && echo "Cloning from $ORIGIN into ../gh-pages ..." && git clone --branch gh-pages $ORIGIN ../gh-pages ;; + *) echo "You are working on a fork, please make sure, you are releasing from devonfw/cobigen#master" && exit 1 ;; + esac fi log_step() { diff --git a/pom.xml b/pom.xml index ed20f890f6..fe9917738b 100644 --- a/pom.xml +++ b/pom.xml @@ -580,7 +580,9 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + + + 1.6 ${gpg.keyname} @@ -614,12 +616,12 @@ - sonartype.releases + ossrh Sonartype Releases https://oss.sonatype.org/service/local/staging/deploy/maven2/ - sonartype.snapshots + ossrh Sonartype Snapshots https://oss.sonatype.org/content/repositories/snapshots/ @@ -627,7 +629,7 @@ - sonartype.snapshots + ossrh OSSRH Snapshots https://oss.sonatype.org/content/repositories/snapshots/