sapling/ci/tag-name.sh
Saul Gutierrez 388343cc8b further improve compatibility with Homebrew
Summary:
This diff changes our versioning scheme from `MAJOR.MINOR-%Y%m%d-%H%M%S-rHASH` to `MAJOR.MINOR-%Y%m%d-%H%M%S-hHASH`

At the moment we cannot send another PR to Homebrew-core since our lastest release (`0.1.20221212-142634-r7ae28228`) gets detected [as an Erlang version](9c88c39bae/Library/Homebrew/version.rb (L411)) instead of a [hyphenated version](9c88c39bae/Library/Homebrew/version.rb (L427)). This was not an issue in the past since the hashes of our previous releases didn't happen to be of the form (`[Rr]\d+[AaBb]\d*(?:-\d+)?)`).

Reviewed By: bolinfest

Differential Revision: D42006425

fbshipit-source-id: 8dd4c52e1f49b79763bcc5863f7578a0f36dda73
2022-12-13 11:54:51 -08:00

11 lines
379 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
DIR=$(dirname -- "$0")
VERSION=$(<"$DIR"/../SAPLING_VERSION)
COMMIT_INFO=$(git -c "core.abbrev=8" show -s "--format=%cd-h%h" "--date=format:%Y%m%d-%H%M%S")
echo "$VERSION"."$COMMIT_INFO"