From e4e5446731ddd1bf2d65d6dff7e30e0233f7f478 Mon Sep 17 00:00:00 2001 From: Zak Cutner Date: Fri, 28 Aug 2020 10:55:44 +0100 Subject: [PATCH] Bump version to 0.2.0 --- .github/workflows/publish.yml | 2 ++ Cargo.toml | 2 +- scripts/check-version.sh | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 scripts/check-version.sh diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a1687a5..51080f4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,8 @@ jobs: - uses: actions/checkout@v2 - name: Install stable toolchain uses: actions-rs/toolchain@v1 + - name: Check version number + run: ./scripts/check-version.sh - name: Login to registry uses: actions-rs/cargo@v1 env: diff --git a/Cargo.toml b/Cargo.toml index edfba9b..b7fcb79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sliceslice" -version = "0.1.0" +version = "0.2.0" authors = ["marmeladema ", "Zak Cutner "] edition = "2018" description = "A fast implementation of single-pattern substring search using SIMD acceleration" diff --git a/scripts/check-version.sh b/scripts/check-version.sh new file mode 100755 index 0000000..45d5a5b --- /dev/null +++ b/scripts/check-version.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail + +GIT_TAG="$(git describe --tags --exact-match HEAD)" +CARGO_VERSION="$(cargo metadata --no-deps --format-version=1 | jq -r '(.packages[] | select(.name == "sliceslice").version)')" + +if [ "$GIT_TAG" != "v$CARGO_VERSION" ]; then + echo "version mismatch: git tag is $GIT_TAG but cargo version is $CARGO_VERSION" + exit 1 +fi