From 11feadcf89cce80ef8a44f4ad672b8d2759eb8da Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 24 Oct 2022 21:11:35 -0700 Subject: [PATCH] Fail publish if `master` is found in README.md (#1378) --- justfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 26283f1..0e481f1 100755 --- a/justfile +++ b/justfile @@ -72,8 +72,9 @@ publish: set -euxo pipefail rm -rf tmp/release git clone git@github.com:casey/just.git tmp/release - VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1` cd tmp/release + ! grep 'master' README.md + VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1` git tag -a $VERSION -m "Release $VERSION" git push origin $VERSION cargo publish