Skip to content

Commit f2ff8a4

Browse files
committed
and nice script cleanup
1 parent 41fa32a commit f2ff8a4

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ci/update-v1.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,8 @@ version="$1"
1111
darwin_sha="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
1212
linux_sha="$(echo "$3" | tr "[:upper:]" "[:lower:]")"
1313

14-
# Get the old version to use in our find/replace.
15-
old_version="$(sed -n "s/.*version \"\(.*\)\".*/\1/p" "../Formula/coder@1.rb")"
16-
if [[ "$old_version" == "" ]]; then
17-
echo "Could not determine the old version of the formula..." >&2
18-
exit 1
19-
fi
20-
2114
# Replace version
22-
sed -i "s/${old_version//./\.}/${version//./\.}/g" "../Formula/coder@1.rb"
15+
sed -i "s/version \"[0-9.]*\"/version \"$version\"/g" "../Formula/coder@1.rb"
2316

2417
# Update macOS hash
2518
sed -zi "s/sha256 \"[a-f0-9]*\"/sha256 \"$darwin_sha\"/1" "../Formula/coder@1.rb"

0 commit comments

Comments
 (0)