Skip to content

Commit 3a038d3

Browse files
committed
fix: github debian build action
1 parent d95f2c4 commit 3a038d3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/build-deb.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ jobs:
5858
apt-get update
5959
apt-get install -y build-essential devscripts debhelper autoconf-archive autotools-dev pkg-config sed git tar gzip curl jq libyaml-cpp-dev rsync
6060
61-
CODENAME=$(lsb_release -sc)
62-
curl -fsSL https://deb.burger-system.de/deb.burger-system.de.gpg | tee /usr/share/keyrings/deb.burger-system.de.gpg > /dev/null
63-
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/deb.burger-system.de.gpg] https://deb.burger-system.de/debian ${CODENAME} main" | tee /etc/apt/sources.list.d/burger-system.list > /dev/null
64-
61+
curl -fsSL https://deb.burger-system.de/setup.sh | bash > /dev/null
6562
apt-get update
6663
apt-get install -y libethercat-dev libosal-dev robotkernel-service-helper robotkernel-dev \
6764
service-provider-canopen-protocol-dev \
@@ -88,20 +85,23 @@ jobs:
8885
shell: bash
8986
run: |
9087
# baue mit dpkg-buildpackage (ohne signieren)
88+
export DEBEMAIL="[email protected]"
89+
export DEBFULLNAME="Robert Burger"
9190
CODENAME=$(lsb_release -sc)
92-
DEBEMAIL="[email protected]"
93-
DEBFULLNAME="Robert Burger"
9491
VERSION=$(dpkg-parsechangelog --show-field Version)
92+
PRE_VERSION="pre${GITHUB_RUN_NUMBER}"
9593
9694
# Check if version already contains codename suffix
9795
if [[ "$VERSION" == *"~${CODENAME}"* || "$VERSION" == *"+${CODENAME}"* ]]; then
9896
echo "Version already contains codename suffix, skipping dch."
9997
else
100-
# If there's already a ~ in version (like ~pre1), add +codename
101-
if [[ "$VERSION" == *"~"* ]]; then
102-
dch --local +${CODENAME} --distribution ${CODENAME} "Build for ${CODENAME}"
98+
if [[ ! $GITHUB_REF =~ ^refs/tags/ ]]; then
99+
# Not a tag, so add ~pre<x>
100+
FULL_VERSION="${VERSION}~${PRE_VERSION}-1~${CODENAME}-pre"
101+
dch -b --newversion "${FULL_VERSION}" --distribution "${CODENAME}-pre" "Pre-release for ${CODENAME}-pre"
103102
else
104-
dch --local ~${CODENAME} --distribution ${CODENAME} "Build for ${CODENAME}"
103+
FULL_VERSION="${VERSION}-1~${CODENAME}"
104+
dch --newversion "${FULL_VERSION}" --distribution "${CODENAME}" "Pre-release for ${CODENAME}"
105105
fi
106106
fi
107107

0 commit comments

Comments
 (0)