Skip to content

Commit 246de09

Browse files
committed
fixed deployment
1 parent eefd892 commit 246de09

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

deploy.sh

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,25 @@ function doRunCommand() {
121121
# check preconditions
122122
if [ "$DEPLOY_UPDATESITE" = "stable" ] && [ -d "../gh-pages" ]
123123
then
124-
cd ../gh-pages
125-
CHANGE_LIST=$(git diff --shortstat && git status --porcelain)
126-
if [ ! -z "$CHANGE_LIST" ]
127-
then
128-
echo "../gh-pages is not clean"
129-
doAskQuestion "Should I cleanup?" # will exit if no
130-
doRunCommand "git reset --hard HEAD"
131-
doRunCommand "git clean -xf"
132-
doRunCommand "git pull"
133-
fi
134-
cd "$SCRIPT_PATH"
124+
cd ../gh-pages
125+
if [[ $(git diff --shortstat && git status --porcelain) ]]
126+
then
127+
echo "../gh-pages is prepared"
128+
else
129+
echo "../gh-pages is not clean"
130+
doAskQuestion "Should I cleanup?" # will exit if no
131+
doRunCommand "git reset --hard HEAD"
132+
doRunCommand "git clean -xf"
133+
doRunCommand "git pull"
134+
fi
135+
cd "$SCRIPT_PATH"
135136
else
136-
echo "Not detected cloned gh-pages branch in ../gh-pages folder."
137+
echo "Not detected cloned gh-pages branch in ../gh-pages folder."
138+
ORIGIN="$(git config --get remote.origin.url)"
139+
case "$ORIGIN" in
140+
*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 ;;
141+
*) echo "You are working on a fork, please make sure, you are releasing from devonfw/cobigen#master" && exit 1 ;;
142+
esac
137143
fi
138144

139145
log_step() {

pom.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,9 @@
580580
<plugin>
581581
<groupId>org.apache.maven.plugins</groupId>
582582
<artifactId>maven-gpg-plugin</artifactId>
583-
<version>3.0.1</version>
583+
<!-- version errors on win with "no pinentry" -->
584+
<!-- <version>3.0.1</version> -->
585+
<version>1.6</version>
584586
<configuration>
585587
<keyname>${gpg.keyname}</keyname>
586588
</configuration>
@@ -614,20 +616,20 @@
614616

615617
<distributionManagement>
616618
<repository>
617-
<id>sonartype.releases</id>
619+
<id>ossrh</id>
618620
<name>Sonartype Releases</name>
619621
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
620622
</repository>
621623
<snapshotRepository>
622-
<id>sonartype.snapshots</id>
624+
<id>ossrh</id>
623625
<name>Sonartype Snapshots</name>
624626
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
625627
</snapshotRepository>
626628
</distributionManagement>
627629

628630
<repositories>
629631
<repository>
630-
<id>sonartype.snapshots</id>
632+
<id>ossrh</id>
631633
<name>OSSRH Snapshots</name>
632634
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
633635
<snapshots>

0 commit comments

Comments
 (0)