Improve version bumping logic

Summary:
Currently, when bumping the version, the script will override "-SNAPSHOT" mentions in both the docs and the properties. This requires some manual fixup after every release. With this change, you can pass "-s" or "--snapshot" to change the version number to a snapshot release and it will only affect the places where that change is necessary.

Did some overall cleanup, too, like getting rid of the macro magic to determine the current location which messes with tooling.

This does *not* include the updated binaries yet. I'll put them up as a separate diff.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13782177

fbshipit-source-id: 87ad0ab20a5f544ddb6aa3e2d30949bbabbabfc4
This commit is contained in:
Pascal Hartig
2019-01-23 08:00:35 -08:00
committed by Facebook Github Bot
parent e36b5d1ceb
commit 64d3f34fe5
2 changed files with 49 additions and 29 deletions

View File

@@ -1,9 +1,11 @@
#!/bin/bash
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Run from here so we know we're having fbsource in our $PWD.
cd "$BASEDIR" || exit
case $OSTYPE in
darwin*) "$BASEDIR"/bump.mac "$@" ;;
linux-gnu) "$BASEDIR"/bump.lnx64 "$@" ;;
*) echo "Unknown OS. Using source version using https://haskellstack.org/" && "$BASEDIR"/bump.hs "$@" ;;
darwin*) ./bump.mac "$@" ;;
linux-gnu) ./bump.lnx64 "$@" ;;
*) echo "Unknown OS. Using source version via https://haskellstack.org/" && ./bump.hs "$@" ;;
esac