summaryrefslogtreecommitdiff
path: root/taler-docbuild
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-03-01 16:40:50 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2019-03-01 16:40:50 +0100
commitd48b3d00a3e7063ab058df8b476028f0aec82474 (patch)
tree916a50658d150ac9d1cda3e9e670060f9ee69d38 /taler-docbuild
parent40e5ed510270fc4dfb5814c4dc8120db9c740f52 (diff)
downloaddeployment-d48b3d00a3e7063ab058df8b476028f0aec82474.tar.gz
deployment-d48b3d00a3e7063ab058df8b476028f0aec82474.tar.bz2
deployment-d48b3d00a3e7063ab058df8b476028f0aec82474.zip
Addressing #5424.
Diffstat (limited to 'taler-docbuild')
-rw-r--r--taler-docbuild/Makefile5
-rwxr-xr-xtaler-docbuild/update_stage.sh (renamed from taler-docbuild/update_www_and_stage.sh)5
-rwxr-xr-xtaler-docbuild/update_www.sh16
3 files changed, 19 insertions, 7 deletions
diff --git a/taler-docbuild/Makefile b/taler-docbuild/Makefile
index 92f4379..4c286e3 100644
--- a/taler-docbuild/Makefile
+++ b/taler-docbuild/Makefile
@@ -39,9 +39,10 @@ deployment-stamp:
touch $@
stage.taler.net-stamp:
- ./update_www_and_stage.sh
+ ./update_stage.sh
touch $@
+# Cares about the 'stable' branch.
www.taler.net-stamp:
- ./update_www_and_stage.sh
+ ./update_www.sh
touch $@
diff --git a/taler-docbuild/update_www_and_stage.sh b/taler-docbuild/update_stage.sh
index a57c889..3f7f585 100755
--- a/taler-docbuild/update_www_and_stage.sh
+++ b/taler-docbuild/update_stage.sh
@@ -14,8 +14,3 @@ cd $HOME/stage.taler.net
fetch
git submodule update --init --force
make
-
-cd $HOME/www.taler.net
-fetch
-git submodule update --init --force
-make
diff --git a/taler-docbuild/update_www.sh b/taler-docbuild/update_www.sh
new file mode 100755
index 0000000..b4912d3
--- /dev/null
+++ b/taler-docbuild/update_www.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -eu
+
+fetch () {
+ git clean -fdx
+ git fetch
+ # reset to updated upstream branch, but only if we're tracking a branch
+ branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo HEAD)
+ git reset --hard "$branch"
+}
+
+cd $HOME/www.taler.net
+fetch
+git submodule update --init --force
+make