Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Check that $SED is executable #188

Merged
merged 1 commit into from
Jul 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion bin/promote-nightly-to-release
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,20 @@ if ! echo "$VERSION" | grep -q -e '^[0-9]\+\.[0-9]\+$'; then
echo "Only specify MAJOR.MINOR version, not MAJOR.MINOR.RELEASE"
exit 1
fi

MAJOR=$(echo "$VERSION" | cut -f1 -d.)
MINOR=$(echo "$VERSION" | cut -f2 -d.)

SED=$(if [ "$(uname -s)" == "Darwin" ]; then echo gsed; else echo sed; fi)

if ! which $SED >/dev/null; then
echo "'$SED' is required."
if [ "$SED" == "gsed" ]; then
echo "Try: brew install gnu-sed"
fi
exit 1
fi

PKGDIR="$(pwd)"
if [ ! -e "$PKGDIR/bin/$(basename $0)" ]; then
echo "This script must be ran from the root of the packaging repository."
Expand Down Expand Up @@ -66,7 +77,6 @@ git clone [email protected]:hhvm/hhvm-docker.git
cd hhvm-docker
statusline "Removing 'latest' from previous release branch tags..."
git checkout "HHVM-${MAJOR}.$(($MINOR - 1))"
SED=$(if [ "$(uname -s)" == "Darwin" ]; then echo gsed; else echo sed; fi)
$SED -i '/^latest$/d' EXTRA_TAGS
git commit EXTRA_TAGS -m "Removing 'latest' tag"
git push
Expand Down