Skip to content
Snippets Groups Projects
Commit 5ece62da authored by Fokke Dijkstra's avatar Fokke Dijkstra
Browse files

Make version a variable based on the tag.

parent 0cb43b34
Branches
Tags
No related merge requests found
......@@ -32,13 +32,18 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- name: find release version in tag
id: find_version
run: |
echo ::set-output name=version::${GITHUB_REF#refs/tags/}
- name: create tarball
shell: bash
run: |
version="$(grep Version hb-jobinfo.spec | awk '{print $2}')"
version=$(echo ${{ steps.find_version.outputs.version }} | tr -d 'v')
mkdir SOURCES
mkdir SPECS
cp hb-jobinfo.spec SPECS
cat hb-jobinfo.spec | sed s/HB_JOBINFO_VERSION/$version/ > SPECS/hb-jobinfo.spec
mkdir hb-jobinfo-${version}
cp jobinfo hb-jobinfo-${version}
tar -czf SOURCES/hb-jobinfo-${version}.tar.gz hb-jobinfo-${version}
......
Name: hb-jobinfo
Version: 0.9.2
Version: HB_JOBINFO_VERSION
Release: 1%{?dist}
Summary: Collect job information from SLURM in nicely readable format.
Obsoletes: jobinfo <= 2.1.0
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment