diff --git a/publishGitHub.sh b/publishGitHub.sh new file mode 100755 index 0000000..3ec50cd --- /dev/null +++ b/publishGitHub.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -euo pipefail +echo HEJ +SOURCE="$HOME/projects/com_r35157_nenjim-hubd-impl_ref" +TARGET="$HOME/projects/com_r35157_nenjim-hubd-impl_ref_github_snapshot" + +rsync -v -a --delete \ + --exclude '.git' \ + --exclude 'conf/*.conf' \ + --exclude 'conf/*.xml' \ + "$SOURCE/" \ + "$TARGET/" +echo HEST +exit +cd "$TARGET" +git add -A + +if git diff --cached --quiet; then + echo "No snapshot changes to publish." + exit 0 +fi + +git commit -m "Mirror snapshot" +git push