From 77792bc4317a8a02df06d561f1507f8ecdc56ae8 Mon Sep 17 00:00:00 2001 From: Aleksander Zaruczewski Date: Tue, 2 Apr 2024 12:56:37 +0300 Subject: [PATCH] chore: fix release flow --- .github/workflows/release.yml | 15 --------------- Dockerfile | 2 +- main.go | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f0bf70c..a368ef0e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,21 +6,6 @@ on: - v* jobs: - bump_version: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - run: | - sed -i "s/const operatorVersion = \".*\"/const operatorVersion = \"${GITHUB_REF_NAME#v}\"/" main.go - - uses: Amraneze/push-to-protected-branch@v1.5.0 - with: - repository: ${{ github.repository }} - branch_name: main - github_token: ${{ secrets.AIVEN_CI_PAT__VALID_WHILE_ALEKS_IS_EMPLOYED }} - commit_message: "chore(version): bump operator version" - files_to_commit: main.go build_default_release_manifest: runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index 0266463d..ebcd16ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ARG TARGETOS ARG TARGETARCH ARG VERSION=dev RUN CGO_ENABLED=0 GOOS="$TARGETOS" GOARCH="$TARGETARCH" go build -trimpath \ - -ldflags="-s -w -X github.com/aiven/aiven-operator/controllers.version=${VERSION}" \ + -ldflags="-s -w -X main.operatorVersion=${VERSION}" \ -a -o manager main.go # Use distroless as minimal base image to package the manager binary diff --git a/main.go b/main.go index 391d0026..6e1b7bc4 100644 --- a/main.go +++ b/main.go @@ -30,7 +30,7 @@ var ( ) // operatorVersion is the current version of the operator. -const operatorVersion = "0.17.0" +var operatorVersion = "dev" const port = 9443