Skip to content

Commit

Permalink
Merge pull request #2 from axoflow/fix-alpine-version
Browse files Browse the repository at this point in the history
docker/ci: fix Alpine snapshot package versioning
  • Loading branch information
MrAnno authored Jan 30, 2023
2 parents 7dafba3 + 455af4d commit eeba57c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
docker run --rm syslog-ng:test --syntax-only
docker run --rm syslog-ng:test --module-registry
docker run --rm syslog-ng:test -V | grep 'Revision: .*\.g'
docker run --rm syslog-ng:test -V | grep 'Installer-Version: .*\.g'
printf "@version: 4.0\n log { source { stdin(); }; destination { file("/dev/stdout"); }; };" > test.conf
echo "test msg" | docker run -i --rm -v $(realpath test.conf):/etc/syslog-ng/syslog-ng.conf syslog-ng:test -F | grep "test msg"
Expand Down
3 changes: 2 additions & 1 deletion alpine.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RUN mkdir packages \
[ -z "$tarball_filename" ] && echo "Tarball for nightly can not be found" && exit 1; \
tarball_name="${tarball_filename/\.tar.*}"; \
tarball_version="${tarball_name/syslog-ng-}"; \
sed -i -e "s|^pkgver=.*|pkgver=$tarball_version|" -e "s|^builddir=.*|builddir=\"\$srcdir/$tarball_name\"|" APKBUILD; \
pkg_version="$(echo $tarball_version | sed -E 's|(([0-9]+\.){2}[0-9]+).*|\1|')_git$(date +%Y%m%d)"; \
sed -i -e "s|^pkgver=.*|pkgver=$pkg_version|" -e "s|^builddir=.*|builddir=\"\$srcdir/$tarball_name\"|" APKBUILD; \
sed -i -e "s|^source=.*|source=\"$tarball_filename\"|" APKBUILD; \
fi \
&& abuild checksum \
Expand Down
4 changes: 3 additions & 1 deletion apkbuild/axoflow/syslog-ng/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ done

build() {
CFLAGS="$CFLAGS -flto=auto" \
SOURCE_REVISION="$pkgver" \
./configure \
--prefix=/usr \
--sysconfdir=/etc/syslog-ng \
Expand Down Expand Up @@ -123,6 +122,9 @@ scl() {
dev() {
default_dev

# fix snapshot version
sed -i -e "s|^Version: .*|Version: $pkgver|g" "$subpkgdir/usr/lib/pkgconfig/syslog-ng.pc"

_submv usr/share/syslog-ng/tools \
usr/share/syslog-ng/xsd
}
Expand Down

0 comments on commit eeba57c

Please sign in to comment.