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 on 2017-02-17
Status: Merged
Approved by: Jim Hodapp on 2017-02-17
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) 2017-02-17 Approve on 2017-02-17
System Enablement Bot continuous-integration Approve on 2017-02-17
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.
Jim Hodapp (jhodapp) :
review: Needs Information
Konrad Zapałowicz (kzapalowicz) wrote :

replied

Jim Hodapp (jhodapp) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/generic-release-snap b/jobs/generic-release-snap
2index 4c05499..7140be5 100755
3--- a/jobs/generic-release-snap
4+++ b/jobs/generic-release-snap
5@@ -42,7 +42,7 @@ fi
6 git config user.name "System Enablement CI Bot"
7 git config user.email "ce-system-enablement@lists.canonical.com"
8
9-sed -i -e "s/version:.*/version: $VERSION/g" snapcraft.yaml
10+sed -i -e "s/version:\ .*/version: $VERSION/g" snapcraft.yaml
11 git add snapcraft.yaml
12 git commit -m "Bump version to $VERSION"
13

Subscribers

People subscribed via source and target branches