Skip to content

Commit

Permalink
[build] fix rpm spec version
Browse files Browse the repository at this point in the history
  • Loading branch information
tstack committed Jul 1, 2023
1 parent 0d40656 commit c575ba0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/rpmbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
echo "LNAV_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "LNAV_VERSION_NUMBER=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
echo "version is: ${{ env.LNAV_VERSION }}"
make -C release lnav.spec
- name: build RPM package
id: rpm
uses: tstack/rpmbuild@master
Expand Down
7 changes: 7 additions & 0 deletions docs/02_downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ Install from the [Snap Store](https://snapcraft.io/lnav):
$ sudo snap install lnav
```

Install RPMs from [Package Cloud](https://packagecloud.io/tstack/lnav):

```console
$ curl -s https://packagecloud.io/install/repositories/tstack/lnav/script.rpm.sh | sudo bash
$ sudo yum install lnav
```

## MacOS

<!-- markdown-link-check-disable-next-line -->
Expand Down
3 changes: 3 additions & 0 deletions release/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ push:
clean:
cd vagrant-static && vagrant destroy -f
rm -rf vagrant-static/pkgs

lnav.spec: lnav.spec.in makespec.sh
./makespec.sh < lnav.spec.in > $@
2 changes: 1 addition & 1 deletion release/lnav.spec → release/lnav.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# published by the Open Source Initiative.

Name: lnav
Version: 0.11.2
Version: @@LNAV_VERSION_NUMBER@@
Release: 0
Summary: Logfile Navigator
License: BSD-2-Clause
Expand Down
13 changes: 13 additions & 0 deletions release/makespec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

DEFAULT_VERSION=$(head -1 ../configure.ac | cut -d, -f2)
DEFAULT_VERSION=${DEFAULT_VERSION#[}
DEFAULT_VERSION=${DEFAULT_VERSION%]}

if [ "$GITHUB_REF_TYPE" == 'tag' ]; then
export LNAV_VERSION_NUMBER=${GITHUB_REF#refs/tags/v}
else
export LNAV_VERSION_NUMBER="${DEFAULT_VERSION}^"$(date +%Y%m%d).git$(git rev-parse --short HEAD)
fi

sed -e "s/@@LNAV_VERSION_NUMBER@@/${LNAV_VERSION_NUMBER}/g"

0 comments on commit c575ba0

Please sign in to comment.