aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/version-bump
blob: c3f12bb2df473ff56f9170491b00bd04f9f69a5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash

if [ -z "$GIT_TAG" ]; then
  echo "GIT_TAG is not set"
  exit 1
fi

OLD_TAG=$(jq -r '.version' package.json)

rg "$OLD_TAG" --files-with-matches --iglob \!\*lock\* --iglob \!go.mod --iglob \!deno.json --iglob \!package.json --iglob \!\*.md | xargs sed -i "s/$OLD_TAG/$GIT_TAG/g"

# fiddle with autotools
AUTOTOOLS_TAG=${GIT_TAG//\./:}
OLD_TAG=${OLD_TAG//\./:}

sed -i "s/$GIT_TAG/$AUTOTOOLS_TAG/g" GNUmakefile.am