From 6480f793c450f3393abfdb782b0cd72f7088b1b4 Mon Sep 17 00:00:00 2001 From: Matthew Rich Date: Sun, 26 May 2024 15:57:23 -0700 Subject: [PATCH] fix package rpmbuild name --- .gitea/workflows/release.yaml | 2 +- .gitea/workflows/test.yaml | 2 +- Makefile | 5 +++-- build/jx.spec | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index c416ff2..7a0ba2c 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV - - run: dnf install -y dnf-plugins-core rpmbuild rpmdevtools + - run: dnf install -y dnf-plugins-core rpm-build rpmdevtools - run: dnf builddep -y build/jx.spec - run: make rpm - uses: ncipollo/release-action@v1 diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 1575769..0893d70 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -78,7 +78,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v3 - run: echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV - - run: dnf install -y dnf-plugins-core rpmbuild rpmdevtools + - run: dnf install -y dnf-plugins-core rpm-build rpmdevtools - run: dnf builddep -y build/jx.spec - name: Run build run: | diff --git a/Makefile b/Makefile index 88285b0..9bb24b1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ LDFLAGS?=--ldflags '-extldflags "-static"' --ldflags="-X 'main.commit=$(shell git rev-parse HEAD)' -X 'main.version=$(shell git describe --tags)' -X 'main.date=$(shell date '+%Y-%m-%d %T.%s%z')'" export CGO_ENABLED=1 - +VERSION?=$(shell git describe --tags | sed -e 's/^v//') .PHONY=jx-cli build: jx-cli @@ -13,4 +13,5 @@ test: jx-cli go tool cover -html=artifacts/coverage.profile -o artifacts/code-coverage.html rpm: - rpmbuild -ba build/jx.spec + dnf install -y nodejs git dnf-plugins-core rpm-build rpmdevtools + rpmbuild -ba --define='version $(VERSION)' build/jx.spec diff --git a/build/jx.spec b/build/jx.spec index 99da4d0..fd72b26 100644 --- a/build/jx.spec +++ b/build/jx.spec @@ -1,5 +1,5 @@ Name: jx -Version: 0.2.2 +Version: %{version} Release: %{!?rel:1}%{?dist} Summary: Provision resources using a declarative YAML syntax.