mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-05 20:41:35 -07:00
Add a setgitversion
script to update the version string with git
This commit is contained in:
parent
e7df718724
commit
db4701d8b5
3 changed files with 15 additions and 1 deletions
11
setgitversion
Executable file
11
setgitversion
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh -xe
|
||||
# This script hardcodes the `git describe` version as ShellCheck's version number.
|
||||
# This is done to allow shellcheck --version to differ from the cabal version when
|
||||
# building git snapshots.
|
||||
|
||||
file="src/ShellCheck/Data.hs"
|
||||
test -e "$file"
|
||||
tmp=$(mktemp)
|
||||
version=$(git describe)
|
||||
sed -e "s/=.*VERSIONSTRING.*/= \"$version\" -- VERSIONSTRING, DO NOT SUBMIT/" "$file" > "$tmp"
|
||||
mv "$tmp" "$file"
|
Loading…
Add table
Add a link
Reference in a new issue