mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 17:28:40 +00:00
Ensure that zed package version matches git tag before packaging a release
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
f742f63007
commit
298c991c93
2 changed files with 20 additions and 0 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -69,6 +69,10 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
with:
|
||||
clean: false
|
||||
|
||||
- name: Validate version
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
run: script/validate-version
|
||||
|
||||
- name: Download rust-analyzer
|
||||
run: script/download-rust-analyzer
|
||||
|
|
16
script/validate-version
Executable file
16
script/validate-version
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ ! -f vendor/bin/jq ]]; then
|
||||
curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64 > vendor/bin/jq
|
||||
chmod +x vendor/bin/jq
|
||||
fi
|
||||
|
||||
package_version="v$(cargo metadata --format-version=1 | vendor/bin/jq --raw-output '.packages[] | select(.name == "zed") | .version')"
|
||||
git_tag=$(git tag --points-at HEAD)
|
||||
|
||||
if [[ $package_version != $git_tag ]]; then
|
||||
echo "Version $package_version of zed package does not match git tag $git_tag"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue