File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
11
11
STARTDIR=" $( pwd) "
12
12
DESTDIR=" $STARTDIR /pkg"
13
13
OUTDIR=" $STARTDIR /deb"
14
+ # get version
15
+ repo=" azlux/log2ram"
16
+ api=$( curl --silent " https://api.github.com/repos/$repo /releases/latest" )
17
+ new=$( echo $api | grep -Po ' "tag_name": "\K.*?(?=")' )
14
18
15
19
# Remove potential leftovers from a previous build
16
20
rm -rf " $DESTDIR " " $OUTDIR "
@@ -30,4 +34,8 @@ install -Dm 644 "$STARTDIR/log2ram.logrotate" "$DESTDIR/etc/logrotate.d/log2ram"
30
34
# Build .deb
31
35
mkdir " $DESTDIR /DEBIAN" " $OUTDIR "
32
36
cp " $STARTDIR /debian/" * " $DESTDIR /DEBIAN/"
37
+
38
+ # Set version
39
+ sed -i " s/VERSION-TO-REPLACE/$new /" " $DESTDIR /DEBIAN/control"
40
+
33
41
dpkg-deb --build " $DESTDIR " " $OUTDIR "
Original file line number Diff line number Diff line change 1
1
Package: log2ram
2
- Version: 1.4.2
2
+ Version: VERSION-TO-REPLACE
3
3
Section: net
4
4
Priority: optional
5
5
Architecture: all
You can’t perform that action at this time.
0 commit comments