mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 18:34:41 +02:00
Add script and generated snapcraft.yaml files (#8096)
This PR adds a proper snapcraft.yaml file for each DNS plugin, and provides a shell script to generate them.
This commit is contained in:
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# Generate the snapcraft.yaml file for all DNS plugins
|
||||
set -e
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
CERTBOT_DIR="$(dirname "${DIR}")"
|
||||
|
||||
for PLUGIN_PATH in "${CERTBOT_DIR}"/certbot-dns-*; do
|
||||
PLUGIN=$(basename "${PLUGIN_PATH}")
|
||||
DESCRIPTION=$(grep description "${PLUGIN_PATH}/setup.py" | sed -E 's|\s+description="(.*)",|\1|g')
|
||||
mkdir -p "${PLUGIN_PATH}/snap"
|
||||
cat <<EOF > "${PLUGIN_PATH}/snap/snapcraft.yaml"
|
||||
name: ${PLUGIN}
|
||||
summary: ${DESCRIPTION}
|
||||
description: ${DESCRIPTION}
|
||||
confinement: strict
|
||||
grade: devel
|
||||
base: core18
|
||||
adopt-info: ${PLUGIN}
|
||||
|
||||
parts:
|
||||
${PLUGIN}:
|
||||
plugin: python
|
||||
source: .
|
||||
constraints: [\$SNAPCRAFT_PART_SRC/snap-constraints.txt]
|
||||
python-version: python3
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version \`grep ^version \$SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"\`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
interface: content
|
||||
content: certbot-1
|
||||
read:
|
||||
- \$SNAP/lib/python3.6/site-packages
|
||||
EOF
|
||||
done
|
||||
Reference in New Issue
Block a user