From ed7915c1dd7fa4b123dcb596fe68bd96c6b762c0 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Thu, 9 Jul 2020 22:29:05 +0200 Subject: [PATCH] Define scripts --- tools/snap/build_dns_remote.sh | 28 ++++++++++++++++++++++++++++ tools/snap/build_remote.sh | 18 ++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100755 tools/snap/build_dns_remote.sh create mode 100755 tools/snap/build_remote.sh diff --git a/tools/snap/build_dns_remote.sh b/tools/snap/build_dns_remote.sh new file mode 100755 index 000000000..52291b4ad --- /dev/null +++ b/tools/snap/build_dns_remote.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -ex + +DNS_PLUGINS=$1 +SNAP_ARCHS=$2 + +if [[ -z "${DNS_PLUGINS}" ]]; then + echo "You need to specify the DNS plugins" + exit 1 +fi + +if [[ -z "${SNAP_ARCHS}" ]]; then + echo "You need to specify at least one target architecture" + exit 1 +fi + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +CERTBOT_DIR="$(dirname "$(dirname "${DIR}")")" + +trap popd EXIT + +IFS="," +for DNS_PLUGIN in ${DNS_PLUGINS}; do + pushd "${CERTBOT_DIR}/${DNS_PLUGIN}" + python3 ../tools/strip_hashes.py ../letsencrypt-auto-source/pieces/dependency-requirements.txt | grep -v python-augeas > snap-constraints.txt + snapcraft remote-build --launchpad-accept-public-upload --build-on="${SNAP_ARCHS}" + popd +done diff --git a/tools/snap/build_remote.sh b/tools/snap/build_remote.sh new file mode 100755 index 000000000..e56238684 --- /dev/null +++ b/tools/snap/build_remote.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -ex + +SNAP_ARCHS=$1 + +if [[ -z "${SNAP_ARCHS}" ]]; then + echo "You need to specify at least one target architecture" + exit 1 +fi + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +CERTBOT_DIR="$(dirname "$(dirname "${DIR}")")" + +trap popd EXIT + +pushd "${CERTBOT_DIR}" +snapcraft remote-build --launchpad-accept-public-upload --build-on="${SNAP_ARCHS}" +popd