Skip to content

Commit 5028688

Browse files
committed
Modify debian/control in GH workflow to inject nightly version on deb.
1 parent 594a213 commit 5028688

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

  • .github/actions/build-cuttlefish-cvdremote-debian-package

.github/actions/build-cuttlefish-cvdremote-debian-package/action.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ runs:
1212
- name: install debuild dependencies
1313
run: apt install -y config-package-dev debhelper-compat devscripts git golang
1414
shell: bash
15+
- name: Setup nightly version
16+
run: |
17+
# TODO(b/440196950): Setup condition on this step when we build
18+
# stable/unstable versions here too.
19+
20+
# Modify debian/changelog to build debian package with desired version
21+
# format.
22+
# Stable/Unstable version format : X.Y.Z
23+
# Nightly version format : X.Y.Z~gitYYYYMMDD.<Github SHA 8 digit>
24+
DATE=$(date -u +'%Y%m%d')
25+
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-8)
26+
SUFFIX="~git${DATE}.${SHORT_SHA}"
27+
sed -i "1s/(\([0-9]\+.[0-9]\+.[0-9]\+\))/(\1${SUFFIX})/g" \
28+
build/debian/cuttlefish_cvdremote/debian/changelog
29+
shell: bash
1530
- name: Build package
1631
run: |
1732
pushd build/debian/cuttlefish_cvdremote

0 commit comments

Comments
 (0)