Merge ~kzapalowicz/snappy-hwe-snaps/+git/build-scripts:fix/release-script-breaks-parts-named-version into ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Jim Hodapp
Approved revision: f482c9a3481ff20c84ff68e815a843b28668278e
Merged at revision: 5b574b81d60a263293943c41313c64b44b8c34a5
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/build-scripts:fix/release-script-breaks-parts-named-version
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/build-scripts:master
Diff against target: 12 lines (+1/-1)
1 file modified
jobs/generic-release-snap (+1/-1)
Reviewer Review Type Date Requested Status
Jim Hodapp (community) Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+317665@code.launchpad.net

Commit message

Fix for release job which is breaking parts named "version"

The sed part that updates the version: string is targeting all
occurrences, even when it is a part name, not the version itself.

This commit makes sure that the sed part is targetting version in
a form of: "version: SOMETHING" - not the space after ':'

The above will prevent it from picking up a part name which ends
with a semicolon.

Description of the change

Fix for release job which is breaking parts named "version"

The sed part that updates the version: string is targeting all
occurrences, even when it is a part name, not the version itself.

This commit makes sure that the sed part is targetting version in
a form of: "version: SOMETHING" - not the space after ':'

The above will prevent it from picking up a part name which ends
with a semicolon.

To post a comment you must log in.
Revision history for this message
Jim Hodapp (jhodapp) :
review: Needs Information
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

replied

Revision history for this message
Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/jobs/generic-release-snap b/jobs/generic-release-snap
index 4c05499..7140be5 100755
--- a/jobs/generic-release-snap
+++ b/jobs/generic-release-snap
@@ -42,7 +42,7 @@ fi
42git config user.name "System Enablement CI Bot"42git config user.name "System Enablement CI Bot"
43git config user.email "ce-system-enablement@lists.canonical.com"43git config user.email "ce-system-enablement@lists.canonical.com"
4444
45sed -i -e "s/version:.*/version: $VERSION/g" snapcraft.yaml45sed -i -e "s/version:\ .*/version: $VERSION/g" snapcraft.yaml
46git add snapcraft.yaml46git add snapcraft.yaml
47git commit -m "Bump version to $VERSION"47git commit -m "Bump version to $VERSION"
4848

Subscribers

People subscribed via source and target branches