mirror of https://github.com/docker/docs.git
Update release script for GNU sed compatibility
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
parent
5ab6f319e9
commit
bf542964c9
|
|
@ -116,8 +116,13 @@ checkError "Can't clone into ${RELEASE_DIR}, aborting"
|
||||||
cd "${RELEASE_DIR}"
|
cd "${RELEASE_DIR}"
|
||||||
|
|
||||||
display "Bump version number to ${VERSION}"
|
display "Bump version number to ${VERSION}"
|
||||||
sed -i "" "s/Version = \".*-dev\"/Version = \"${VERSION}\"/g" version/version.go
|
|
||||||
|
# Why 'sed' and then 'mv' instead of 'sed -i'? BSD / GNU sed compatibility.
|
||||||
|
# Macs have BSD sed by default, Linux has GNU sed. See
|
||||||
|
# http://unix.stackexchange.com/questions/92895/how-to-achieve-portability-with-sed-i-in-place-editing
|
||||||
|
sed -e "s/Version = \".*-dev\"/Version = \"${VERSION}\"/g" version/version.go >version/version.go.new
|
||||||
checkError "Unable to change version in version/version.go"
|
checkError "Unable to change version in version/version.go"
|
||||||
|
mv -- version/version.go.new version/version.go
|
||||||
|
|
||||||
git add version/version.go
|
git add version/version.go
|
||||||
git commit -q -m"Bump version to ${VERSION}" -s
|
git commit -q -m"Bump version to ${VERSION}" -s
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue