diff --git a/ci/build.sh b/ci/build.sh index 17f643b..0851908 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -29,12 +29,12 @@ main() { git clone --depth=1 --filter=blob:none --tags "${COREDNS_REPO_URL}" "${COREDNS_DIR}" cd "${COREDNS_DIR}" git fetch --tags - LATEST_TAG="$(git tag --list --sort=-version:refname | head -n 1)" - git fetch --tags --depth=1 origin "${LATEST_TAG}" - git checkout "${LATEST_TAG}" + COREDNS_LATEST_VERSION="$(git tag --list --sort=-version:refname | head -n 1)" + git fetch --tags --depth=1 origin "${COREDNS_LATEST_VERSION}" + git checkout "${COREDNS_LATEST_VERSION}" # 5. Update plugin.cfg to include netboxdns plugin - # Insert netboxdns after the 'cache' plugin entry as recommended. [web:16][web:29] + # Insert netboxdns after the 'cache' plugin entry as recommended. if ! grep -q '^netboxdns:' plugin.cfg; then awk ' /^cache:/ { @@ -70,22 +70,22 @@ main() { "${STRIP_BIN}" ./coredns # 11. Create a .deb installing /usr/local/bin/coredns - # Minimal Debian package using dpkg-deb. [web:17] + # Minimal Debian package using dpkg-deb. PKG_ROOT="${TMPDIR}/pkg-root" mkdir -p "${PKG_ROOT}/DEBIAN" "${PKG_ROOT}/usr/local/bin" # Basic metadata; tweak as needed PKG_NAME="coredns-netboxdns" - PKG_VERSION="$(echo "${LATEST_TAG}" | sed 's/^v//')" + PKG_VERSION="$(echo "${COREDNS_LATEST_VERSION}" | sed 's/^v//')" PKG_ARCH="$(dpkg --print-architecture 2>/dev/null || echo amd64)" cat >"${PKG_ROOT}/DEBIAN/control" < +Maintainer: CI Description: CoreDNS with netboxdns plugin Custom CoreDNS build with netboxdns plugin compiled in. EOF @@ -98,7 +98,7 @@ EOF echo "Built Debian package at: ${DEB_OUT}" # 12. Upload the package to Gitea Debian registry - # Gitea uses HTTP PUT with the .deb in the request body. [web:31][web:39] + # Gitea uses HTTP PUT with the .deb in the request body. DEB_REGISTRY_URL="https://git.ohea.xyz/api/packages/dns/debian/pool/trixie/main/upload" echo "Uploading ${DEB_OUT} to ${DEB_REGISTRY_URL}" curl \