Create preview channel
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
if [[ $# < 1 ]]; then
|
||||
echo "Usage: $0 <crate_name>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CRATE_NAME=$1
|
||||
|
||||
cargo metadata \
|
||||
--no-deps \
|
||||
--format-version=1 \
|
||||
| jq \
|
||||
--raw-output \
|
||||
".packages[] | select(.name == \"${CRATE_NAME}\") | .version"
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p vendor/bin
|
||||
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
|
||||
Reference in New Issue
Block a user