Skip to content

Commit

Permalink
chore(scripts): add 'update-version.sh' script
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Jun 14, 2022
1 parent ea415ea commit bd8c92f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/update-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

declare shell_targets=(setup.sh bpkg.sh)
declare json_targets=(bpkg.json)
declare latest="$(git describe --tags --abbrev=0)"

for target in "${shell_targets[@]}"; do
sed -i "s/VERSION=.*/VERSION=\"$latest\"/g" "$target"
done

for target in "${json_targets[@]}"; do
sed -i "s/\"version\"\s*:\s*\".*\",/\"version\": \"$latest\",/g" "$target"
done

0 comments on commit bd8c92f

Please sign in to comment.