diff --git a/README.md b/README.md index b08444253dbaf..a1ebcc0a22960 100644 --- a/README.md +++ b/README.md @@ -259,10 +259,10 @@ In such cases, possible solutions are forcing the new feature to be used with qualified name in `Compat.jl` (e.g. use `Compat.`) or reimplementing the old features on a later Julia version. -If you're adding additional compatibility code to this package, the [`bin/version.sh`](https://github.com/JuliaLang/Compat.jl/blob/master/bin/version.sh) script is useful for extracting the version number from a git commit SHA. For example, from the git repository of `julia`, run something like this: +If you're adding additional compatibility code to this package, the [`contrib/commit-name.sh`](https://github.com/JuliaLang/julia/blob/master/contrib/commit-name.sh) script in the base Julia repository is useful for extracting the version number from a git commit SHA. For example, from the git repository of `julia`, run something like this: ```sh -bash $ /path/to/Compat/bin/version.sh a378b60fe483130d0d30206deb8ba662e93944da +bash $ contrib/commit-name.sh a378b60fe483130d0d30206deb8ba662e93944da 0.5.0-dev+2023 ``` diff --git a/bin/version.sh b/bin/version.sh deleted file mode 100755 index 3d40b8d4742bd..0000000000000 --- a/bin/version.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# Needs to be run from a julia repo clone -# First argument (optional) is a ref to the commit - -gitref=${1:-HEAD} - -ver=$(git show "$gitref:VERSION") -major=$(echo $ver | cut -f 1 -d .) -minor=$(echo $ver | cut -f 2 -d .) - -if [ $major = 0 -a $minor -lt 5 ]; then - # use tag based build number prior to 0.5.0- - last_tag=$(git describe --tags --abbrev=0 "$gitref") - nb=$(git rev-list --count "$gitref" "^$last_tag") - if [ $nb = 0 ]; then - echo $ver - else - echo "$ver+$nb" - fi -else - topdir=$(git rev-parse --show-toplevel) - verchanged=$(git blame -L ,1 -sl $gitref -- "$topdir/VERSION" | cut -f 1 -d " ") - nb=$(git rev-list --count "$gitref" "^$verchanged") - pre=$(echo $ver | cut -s -f 2 -d "-") - if [ $ver = "0.5.0-dev" ]; then - # bump to 0.5.0-dev was one commit after tag during 0.5.0-dev - nb=$(expr $nb + 1) - elif [ $ver = "0.5.0-pre" ]; then - # bump to 0.5.0-pre was 5578 commits after tag - nb=$(expr $nb + 5578) - fi - if [ -n "$pre" ]; then - echo "$ver+$nb" - else - echo $ver - fi -fi