Commit 73b22259 authored by Roman Haefeli's avatar Roman Haefeli
Browse files

build_macos: add --skip-upload flag

parent 07c0848e
#!/bin/bash
SKIP_UPLOAD=false
POSITIONAL_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
-k|--skip-upload)
SKIP_UPLOAD=true
shift
;;
-*|--*)
echo "Unknown option $1"
exit 1
;;
*)
POSITIONAL_ARGS+=("$1") # save positional arg
shift # past argument
;;
esac
done
app_name="netpd"
package_version=$(date +%Y-%m-%d)
src_url="https://github.com/reduzent/netpd"
......@@ -93,6 +114,10 @@ s/{BUNDLE_VERSION}/${app_version}/
dmg "${app_name}-${app_version}-macos-${package_version}.iso" "${app_name}-${app_version}-macos-${package_version}.dmg" || fail
rm "${app_name}-${app_version}-macos-${package_version}.iso" || fail
if $SKIP_UPLOAD; then
# clean up workdir only
rm -r "${work_dir}" || fail
else
# put file online
scp -q "${app_name}-${app_version}-macos-${package_version}.dmg" "all@netpd.org:public_html/software/" || fail
......@@ -104,4 +129,5 @@ s/{BUNDLE_VERSION}/${app_version}/
# update redirect target in .htaccess
ssh all@netpd.org sed -i "2s/[0-9]\.[0-9]\.[0-9]/${app_version}/" public_html/software/.htaccess || fail
fi
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment