index : releng | |
Archlinux32 release engineering | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-05-28 18:07:40 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-05-28 18:07:40 +0200 |
commit | 022270989c09dc1474fa771d9e65f333d16336b4 (patch) | |
tree | 137fcb164b988ff4564adc1eea2fe699590394d0 /build-all | |
parent | 60dbf10d93ad710ddf8b20f8ced19f7f54865ff2 (diff) |
-rwxr-xr-x | build-all | 22 |
@@ -59,6 +59,7 @@ usage() { >&2 echo "possible options:" >&2 echo " -h|--help: show this help and exit." >&2 echo " -f|--force: overwrite already existing artifacts (use with care!)." + >&2 echo " -t|--test: test mode, generate artifacts, but don't pusblish anything." [ -z "$1" ] && exit 1 || exit "$1" } @@ -76,20 +77,25 @@ cleanup() { trap cleanup EXIT eval set -- "$( - getopt -o hf \ + getopt -o hft \ --long force \ + --long test \ --long help \ -n "$(basename "$0")" -- "$@" || \ echo usage )" force=0 +testmode=0 while [ $# -gt 0 ]; do case "$1" in '--force'|'-f') force=1 ;; + '--test'|'-t') + testmode=1 + ;; '--help'|'-h') usage 0 ;; @@ -202,9 +208,11 @@ else fi # update web page for isos and download mirrors -echo "Updating website.." -git -C "${WEBSITE_DIR}" reset --hard -git -C "${WEBSITE_DIR}" pull --ff-only +if [ $testmode = 0 ]; then + echo "Updating website.." + git -C "${WEBSITE_DIR}" reset --hard + git -C "${WEBSITE_DIR}" pull --ff-only +fi "${base_dir}/update-website" \ --website-dir="${WEBSITE_DIR}" \ --mirror-dir="${MIRROR_DIR}" \ @@ -213,8 +221,10 @@ git -C "${WEBSITE_DIR}" pull --ff-only --update-mirrors \ --torrent-seed="https://pool.mirror.archlinux32.org/archisos/archlinux32-${DATE}-${ARCH}.iso.torrent" \ --magnet-link="${magnet_link}" -git -C "${WEBSITE_DIR}" commit 'download/index.html' -m 'download/index.html: new isos ('"${DATE}"')' -git -C "${WEBSITE_DIR}" push +if [ $testmode = 0 ]; then + git -C "${WEBSITE_DIR}" commit 'download/index.html' -m 'download/index.html: new isos ('"${DATE}"')' + git -C "${WEBSITE_DIR}" push +fi # when did we last updates the date +%s > "${ARCHISOS_DIR}/lastupdate" |