Fix snapcraft build
@@ -43,13 +43,13 @@ parts:
REVISION_URL="https://github.com/travis-ci/worker/tree/${REVISION}"
GENERATED="$(date -u +'%Y-%m-%dT%H:%M:%S%z')"
COPYRIGHT="$(grep -i ^copyright LICENSE | sed 's/^[Cc]opyright //')"
- cd -
- sed -i "s#VersionString =.*#VersionString = \"${VERSION}\"#g" ../go/src/github.com/travis-ci/worker/version.go
- sed -i "s#RevisionString =.*#RevisionString = \"${REVISION}\"#g" ../go/src/github.com/travis-ci/worker/version.go
- sed -i "s#RevisionURLString =.*#RevisionURLString = \"${REVISION_URL}\"#g" ../go/src/github.com/travis-ci/worker/version.go
- sed -i "s#GeneratedString =.*#GeneratedString = \"${GENERATED}\"#g" ../go/src/github.com/travis-ci/worker/version.go
- sed -i "s#CopyrightString =.*#CopyrightString = \"${COPYRIGHT}\"#g" ../go/src/github.com/travis-ci/worker/version.go
+ cd ${SNAPCRAFT_PART_SRC}
+ sed -i "s#VersionString =.*#VersionString = \"${VERSION}\"#g" version.go
+ sed -i "s#RevisionString =.*#RevisionString = \"${REVISION}\"#g" version.go
+ sed -i "s#RevisionURLString =.*#RevisionURLString = \"${REVISION_URL}\"#g" version.go
+ sed -i "s#GeneratedString =.*#GeneratedString = \"${GENERATED}\"#g" version.go
+ sed -i "s#CopyrightString =.*#CopyrightString = \"${COPYRIGHT}\"#g" version.go
set +ex
snapcraftctl build
