diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-01-12 17:53:32 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-01-12 17:53:32 +0100 |
commit | e7ecd9aac8260874c3c7af0a5335b22282eba207 (patch) | |
tree | 86408ade2cc09705e8b683c705adc411774620a0 | |
parent | 76e808a481452b84f9b71daf0e9123e1fa9394cb (diff) | |
download | deployment-e7ecd9aac8260874c3c7af0a5335b22282eba207.tar.gz deployment-e7ecd9aac8260874c3c7af0a5335b22282eba207.tar.bz2 deployment-e7ecd9aac8260874c3c7af0a5335b22282eba207.zip |
fix git updating logic
-rwxr-xr-x | taler-build/update_bank.sh | 6 | ||||
-rwxr-xr-x | taler-build/update_deployment.sh | 7 | ||||
-rwxr-xr-x | taler-build/update_exchange.sh | 6 | ||||
-rwxr-xr-x | taler-build/update_landing.sh | 6 | ||||
-rwxr-xr-x | taler-build/update_libgnurl.sh | 6 | ||||
-rwxr-xr-x | taler-build/update_libmicrohttpd.sh | 6 | ||||
-rwxr-xr-x | taler-build/update_merchant.sh | 6 | ||||
-rwxr-xr-x | taler-build/update_merchant_frontends.sh | 6 |
8 files changed, 25 insertions, 24 deletions
diff --git a/taler-build/update_bank.sh b/taler-build/update_bank.sh index 6cda12b..6aa8d50 100755 --- a/taler-build/update_bank.sh +++ b/taler-build/update_bank.sh @@ -5,10 +5,10 @@ set -eu cd $HOME/bank git clean -fxd -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" ./bootstrap ./configure --prefix="$HOME/local" diff --git a/taler-build/update_deployment.sh b/taler-build/update_deployment.sh index c3aa3c5..c3ebe4a 100755 --- a/taler-build/update_deployment.sh +++ b/taler-build/update_deployment.sh @@ -10,7 +10,8 @@ set -eu cd $HOME/deployment git clean -fdx -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" + diff --git a/taler-build/update_exchange.sh b/taler-build/update_exchange.sh index 5c1c12d..8a5201d 100755 --- a/taler-build/update_exchange.sh +++ b/taler-build/update_exchange.sh @@ -5,10 +5,10 @@ set -eu cd $HOME/exchange git clean -fdx -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" ./bootstrap if test ${1:-notgiven} = "--coverage"; then diff --git a/taler-build/update_landing.sh b/taler-build/update_landing.sh index 39f60e4..7395a08 100755 --- a/taler-build/update_landing.sh +++ b/taler-build/update_landing.sh @@ -5,10 +5,10 @@ set -eu cd $HOME/landing git clean -fxd -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" git submodule update --force --init AUTOMAKE="automake --foreign" autoreconf -fiv diff --git a/taler-build/update_libgnurl.sh b/taler-build/update_libgnurl.sh index 356a6eb..a86ddcb 100755 --- a/taler-build/update_libgnurl.sh +++ b/taler-build/update_libgnurl.sh @@ -3,10 +3,10 @@ cd $HOME/gnurl git clean -fxd -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" ./buildconf ./configure --enable-ipv6 --with-gnutls --without-libssh2 --without-libmetalink --without-winidn --without-librtmp --without-nghttp2 --without-nss --without-cyassl --without-polarssl --without-ssl --without-winssl --without-darwinssl --disable-sspi --disable-ntlm-wb --disable-ldap --disable-rtsp --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-file --disable-ftp --disable-smb --prefix=$HOME/local diff --git a/taler-build/update_libmicrohttpd.sh b/taler-build/update_libmicrohttpd.sh index d02d853..43aa639 100755 --- a/taler-build/update_libmicrohttpd.sh +++ b/taler-build/update_libmicrohttpd.sh @@ -3,10 +3,10 @@ cd $HOME/libmicrohttpd/ git clean -fdx -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" ./bootstrap ./configure --prefix=$HOME/local diff --git a/taler-build/update_merchant.sh b/taler-build/update_merchant.sh index 7c00bdf..6cab4be 100755 --- a/taler-build/update_merchant.sh +++ b/taler-build/update_merchant.sh @@ -7,10 +7,10 @@ set -eu cd $HOME/merchant/ git clean -fdx -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" git submodule update --init --force diff --git a/taler-build/update_merchant_frontends.sh b/taler-build/update_merchant_frontends.sh index 417b788..326c4d3 100755 --- a/taler-build/update_merchant_frontends.sh +++ b/taler-build/update_merchant_frontends.sh @@ -5,10 +5,10 @@ set -eu cd $HOME/merchant-frontends/ git clean -fxd -# like "git pull", but robust against force pushes -# and local changes git fetch -git reset --hard FETCH_HEAD +# 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" git submodule update --init --force |