From 3651e49faa99022c398471cf7ea4837c55d489fd Mon Sep 17 00:00:00 2001 From: Elliana May Date: Thu, 23 Jun 2022 12:34:03 +0800 Subject: [PATCH] Update and rename release.ps1 to release.sh --- release.ps1 | 9 --------- release.sh | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) delete mode 100644 release.ps1 create mode 100644 release.sh diff --git a/release.ps1 b/release.ps1 deleted file mode 100644 index 18993e6d..00000000 --- a/release.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -param ([String][Parameter(Mandatory)] $version) - -poetry version $version -git commit pyproject.yaml -m "feat: $version" -git tag $version -git push --tags -git push -poetry publish --build -gh release create $version diff --git a/release.sh b/release.sh new file mode 100644 index 00000000..d0a5224f --- /dev/null +++ b/release.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# More safety, by turning some bugs into errors. +# Without `errexit` you don’t need ! and can replace +# ${PIPESTATUS[0]} with a simple $?, but I prefer safety. +set -o errexit -o pipefail -o noclobber -o nounset + +version=$1 + +poetry version $version +git commit pyproject.yaml -m "feat: $version" +git tag $version +git push --tags +git push +poetry publish --build +gh release create $version