forked from haskell/haskell-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
function replaceHlsVersion() { | ||
# Update all `version:` fields | ||
sed -ri "s/^version:( +)${1}/version:\1${2}/" ./*.cabal ./**/*.cabal | ||
# Update all constraints expected to be in the form `== <version>`. | ||
# We usually don't force an exact version, so this is relatively unambiguous. | ||
# We could introduce some more ad-hoc parsing, if there is still ambiguity. | ||
sed -ri "s/== ${1}/== ${2}/" ./*.cabal ./**/*.cabal | ||
} | ||
|
||
if [ $# -ne 2 ]; | ||
then | ||
echo "USAGE: ./relase/update_versions.sh <OLD_VERSION> <NEW_VERSION>" | ||
fi | ||
|
||
replaceHlsVersion "${1}" "${2}" |