From 5cdd546a335f2abdb633c969e19449c413f629a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 5 Feb 2025 11:24:52 +0100 Subject: [PATCH 1/2] Change: Use SemVer instead of CalVer Use semantic versioning instead of calendar versioning to be able to indicate breakages of the tool in future. --- .github/workflows/release-pontos.yml | 12 ------------ .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ README.md | 7 +++++++ 3 files changed, 34 insertions(+), 12 deletions(-) delete mode 100644 .github/workflows/release-pontos.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-pontos.yml b/.github/workflows/release-pontos.yml deleted file mode 100644 index 5613961..0000000 --- a/.github/workflows/release-pontos.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Release Python package - -on: - pull_request: - types: [closed] - workflow_dispatch: - -jobs: - build-and-release: - name: Create a new release - uses: greenbone/workflows/.github/workflows/release-python.yml@main - secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7b0c38c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release greenbone-feed-sync + +on: + pull_request: + types: [closed] + workflow_dispatch: + inputs: + release-type: + type: choice + description: "Release type. One of patch, minor or major" + options: + - patch + - minor + - major + release-version: + description: "Set an explicit version, that will overwrite release-type. Fails if version is not compliant." + type: string + +jobs: + build-and-release: + name: Create a new release + uses: greenbone/workflows/.github/workflows/release-generic.yml@main + with: + versioning-scheme: semver + release-type: ${{ inputs.release-type }} + release-version: ${{ inputs.release-version }} + secrets: inherit diff --git a/README.md b/README.md index 776433d..c342834 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ date components of the Greenbone Community Edition by default. It is highly configurable and can be adjusted easily for downloading different feed versions. - [Installation](#installation) + - [Version](#version) - [Requirements](#requirements) - [Install using pipx](#install-using-pipx) - [Install using pip](#install-using-pip) @@ -58,6 +59,12 @@ configurable and can be adjusted easily for downloading different feed versions. ## Installation +### Version + +`greenbone-feed-sync` uses [semantic versioning](https://semver.org/). + +Versions prior to 25.0.0 used [calendar versioning](https://calver.org/). + ### Requirements Python 3.9 and later is supported. From 5c2730ac99695d134d455ae2afa104b43fc4f8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Wed, 5 Feb 2025 11:26:31 +0100 Subject: [PATCH 2/2] Update Dockerfile syntax to avoid warnings at GitHub GitHub checks the Dockerfile syntax and issues warnings at every PR. --- .docker/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index a893ed5..ba34511 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stable-slim as builder +FROM debian:stable-slim AS builder COPY . /source @@ -20,9 +20,9 @@ RUN rm -rf dist && /root/.local/bin/poetry build -f wheel FROM debian:stable-slim -ENV PYTHONDONTWRITEBYTECODE 1 -ENV PYTHONUNBUFFERED 1 -ENV PIP_NO_CACHE_DIR off +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 +ENV PIP_NO_CACHE_DIR=off ENV PATH="/root/.local/bin:${PATH}" WORKDIR /greenbone-feed-sync @@ -38,7 +38,7 @@ RUN apt-get update && \ apt-get remove --purge --auto-remove -y && \ rm -rf /var/lib/apt/lists/* -RUN PIPX_HOME=/var/lib/pipx PIPX_BIN_DIR=/usr/bin +RUN PIPX_HOME=/var/lib/pipx PIPX_BIN_DIR=/usr/bin RUN addgroup --gid 1001 --system gvm && \ adduser --no-create-home --shell /bin/false --disabled-password --uid 1001 --system --group gvm