Skip to content

Commit 56b264b

Browse files
hallynDreamConnected
authored andcommitted
builds workflow: make .orig.tar.gz unique per build
This way we can actually post the result to ppa for various releases. The package version previously was something like 6.0.0-0+daily~noble~202510260402 and now becomes 6.0.0~daily~noble~202510260402 So we s/-0+/~/ . This way, we can use an orig tarball named lxc_6.0.0~daily~jammy~202510260402.orig.tar.gz. With the -0 after the version, debuild would only look for lxc_6.0.0.orig.tar.gz. 6.0.0~daily will still be older than any 6.0.0-0 or 6.0.0-1 that might legitimately get pushed into the release. Signed-off-by: Serge Hallyn <serge@hallyn.com>
1 parent 7ddafb1 commit 56b264b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/builds.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,16 @@ jobs:
4747
run: |
4848
make dist
4949
TARBALL=$(ls -1 *.tar.gz)
50-
mv ${TARBALL} ../$(echo ${TARBALL} | sed -e "s/.tar.gz$/.orig.tar.gz/g" -e "s/lxc-/lxc_/g")
50+
# if TARBALL is something like "lxc-6.0.0.tar.gz"
51+
# then we want: lxc_6.0.0+daily~noble~202510252032.orig.tar.gz
52+
newname=${TARBALL%.tar.gz}
53+
newname="${newname/-/_}"
54+
RELEASE=${{ matrix.os }}
55+
D="$(date -u +%Y%m%d%H%M)"
56+
echo "DPKG_DATE=$D" >> $GITHUB_ENV
57+
newname="${newname}~daily~${RELEASE}~${D}.orig.tar.gz"
58+
echo "renaming ${TARBALL} to ../${newname}"
59+
mv ${TARBALL} "../${newname}"
5160
5261
- name: Assemble the package
5362
env:
@@ -62,8 +71,9 @@ jobs:
6271
cd lxc-*/
6372
cp -R ../packaging/debian .
6473
rm -f debian/changelog
74+
D="${DPKG_DATE}" # saved from previous step
6575
dch --create --package lxc \
66-
-v 2:${VERSION}-0+daily~${{ matrix.os }}~$(date -u +%Y%m%d%H%M) \
76+
-v 2:${VERSION}~daily~${{ matrix.os }}~${D} \
6777
--distribution ${{ matrix.os }} \
6878
"Automated snapshot build."
6979

0 commit comments

Comments
 (0)