Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Warren <bmw@users.noreply.github.com>2020-10-31 00:12:57 +0300
committerGitHub <noreply@github.com>2020-10-31 00:12:57 +0300
commite570e8ad3230ed5ce24191cde9bbbc6d2a54b630 (patch)
treeccae32f97c157e61d9f9841ef75282e38817187f /certbot-dns-cloudxns
parentdf138d0027f7ab4a7d510d3c6af1f93d605eef6b (diff)
Generate plugin snap configs as needed (#8411)
While reviewing https://github.com/certbot/certbot/pull/8404, it occurred to me that we're keeping both the generated files and the script used to generate them in `git`. Keeping both around seems unnecessary and is almost asking for the files to get out of sync at some point in the future. I fixed that by removing the files, adding them to `.gitignore`, and updating `build_remote.py` to generate them as needed. * Remove generated files. * Add generated files to gitignore. * Reuse generate_dnsplugins_all.sh in build_remote
Diffstat (limited to 'certbot-dns-cloudxns')
-rw-r--r--certbot-dns-cloudxns/snap/hooks/post-refresh21
-rw-r--r--certbot-dns-cloudxns/snap/snapcraft.yaml41
2 files changed, 0 insertions, 62 deletions
diff --git a/certbot-dns-cloudxns/snap/hooks/post-refresh b/certbot-dns-cloudxns/snap/hooks/post-refresh
deleted file mode 100644
index 717714c20..000000000
--- a/certbot-dns-cloudxns/snap/hooks/post-refresh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh -e
-# This file is generated automatically and should not be edited manually.
-
-# get certbot version
-if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
- echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
- exit 0
-fi
-cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
-
-# get required certbot version for plugin. certbot version must be at least the plugin's
-# version. note that this is not the required version in setup.py, but the version number itself.
-cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
-
-
-$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
-if [ "$exit_code" -eq 1 ]; then
- echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
- "this plugin can be updated; will try again on next refresh."
- exit 1
-fi
diff --git a/certbot-dns-cloudxns/snap/snapcraft.yaml b/certbot-dns-cloudxns/snap/snapcraft.yaml
deleted file mode 100644
index 7af52f684..000000000
--- a/certbot-dns-cloudxns/snap/snapcraft.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-# This file is generated automatically and should not be edited manually.
-name: certbot-dns-cloudxns
-summary: CloudXNS DNS Authenticator plugin for Certbot
-description: CloudXNS DNS Authenticator plugin for Certbot
-confinement: strict
-grade: stable
-base: core20
-adopt-info: certbot-dns-cloudxns
-
-parts:
- certbot-dns-cloudxns:
- plugin: python
- source: .
- constraints: [$SNAPCRAFT_PART_SRC/snap-constraints.txt]
- override-pull: |
- snapcraftctl pull
- snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
- build-environment:
- - SNAP_BUILD: "True"
- # To build cryptography and cffi if needed
- build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
- certbot-metadata:
- plugin: dump
- source: .
- stage: [setup.py, certbot-shared]
- override-pull: |
- snapcraftctl pull
- mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
-
-slots:
- certbot:
- interface: content
- content: certbot-1
- read:
- - $SNAP/lib/python3.8/site-packages
-
-plugs:
- certbot-metadata:
- interface: content
- content: metadata-1
- target: $SNAP/certbot-shared