From 830039d17470d85c5657dd7d5fcb6f438d858ff7 Mon Sep 17 00:00:00 2001 From: y_uuki Date: Thu, 25 Feb 2016 14:07:43 +0900 Subject: [PATCH] Add auto gofmt when release --- script/release.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/release.sh b/script/release.sh index cc96729..8fcff98 100755 --- a/script/release.sh +++ b/script/release.sh @@ -7,8 +7,13 @@ if [ -z "$1" ]; then exit 1 fi -new_version=$(gobump "$1" -w -v cmd | jq -r '.[]') +# gofmt +gofmt -s -w . +git add ./*.go +git commit -m "gofmt" || true # ignore no changes error +# gobump +new_version=$(gobump "$1" -w -v cmd | jq -r '.[]') git add ./*.go git commit -m "Bump version $new_version" git push origin master