-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some scrappy scripts to facilitate version bumps (#251)
- Loading branch information
1 parent
4eb9b29
commit e675c39
Showing
3 changed files
with
90 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
### | ||
# Bump the extension version. | ||
# | ||
# Usage: | ||
# ./scripts/bump_extension_version.sh 2023.30.0 2023.32.0 | ||
### | ||
|
||
set -euxo pipefail | ||
|
||
FROM=$1 | ||
TO=$2 | ||
|
||
# Create a branch. | ||
git checkout -B v$TO main | ||
|
||
# Update the version in-place. | ||
rg $FROM --files-with-matches | xargs sed -i "" "s/$FROM/$TO/g" | ||
|
||
# Re-lock dependencies. | ||
rm requirements.txt | ||
rm requirements-dev.txt | ||
pip-compile --generate-hashes --resolver=backtracking -o ./requirements.txt ./pyproject.toml | ||
pip-compile --generate-hashes --resolver=backtracking --upgrade --extra dev -o ./requirements-dev.txt ./pyproject.toml | ||
npm install --package-lock-only | ||
|
||
# Commit the change. | ||
git commit -am "Bump extension version to $TO" | ||
|
||
# Push. | ||
git push origin HEAD |
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,30 @@ | ||
### | ||
# Bump the Ruff LSP version. | ||
# | ||
# Usage: | ||
# ./scripts/bump_lsp_version.sh 0.0.33 0.0.34 | ||
### | ||
|
||
set -euxo pipefail | ||
|
||
FROM=$1 | ||
TO=$2 | ||
|
||
# Create a branch. | ||
git checkout -B v$TO main | ||
|
||
# Update the version in-place. | ||
rg $FROM --files-with-matches | xargs sed -i "" "s/$FROM/$TO/g" | ||
|
||
# Re-lock dependencies. | ||
rm requirements.txt | ||
rm requirements-dev.txt | ||
pip-compile --generate-hashes --resolver=backtracking -o ./requirements.txt ./pyproject.toml | ||
pip-compile --generate-hashes --resolver=backtracking --upgrade --extra dev -o ./requirements-dev.txt ./pyproject.toml | ||
npm install --package-lock-only | ||
|
||
# Commit the change. | ||
git commit -am "Bump ruff-lsp version to $TO" | ||
|
||
# Push. | ||
git push origin HEAD |
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,30 @@ | ||
### | ||
# Bump the extension version. | ||
# | ||
# Usage: | ||
# ./scripts/bump_ruff_version.sh 0.0.274 0.0.277 | ||
### | ||
|
||
set -euxo pipefail | ||
|
||
FROM=$1 | ||
TO=$2 | ||
|
||
# Create a branch. | ||
git checkout -B v$TO main | ||
|
||
# Update the version in-place. | ||
rg $FROM --files-with-matches | xargs sed -i "" "s/$FROM/$TO/g" | ||
|
||
# Re-lock dependencies. | ||
rm requirements.txt | ||
rm requirements-dev.txt | ||
pip-compile --generate-hashes --resolver=backtracking -o ./requirements.txt ./pyproject.toml | ||
pip-compile --generate-hashes --resolver=backtracking --upgrade --extra dev -o ./requirements-dev.txt ./pyproject.toml | ||
npm install --package-lock-only | ||
|
||
# Commit the change. | ||
git commit -am "Bump Ruff version to $TO" | ||
|
||
# Push. | ||
git push origin HEAD |