Skip to content
This repository was archived by the owner on Jun 11, 2021. It is now read-only.

Commit 8227ab0

Browse files
committed
Make scripts in package.json a little more readable
1 parent b0d0331 commit 8227ab0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
.DS_Store
1515

16+
*.log
17+
1618
# Terrafile output
1719
vendor/modules
1820
xterrafile

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
"private": true,
77
"scripts": {
88
"test": "go build -v ; go test -v ./...",
9-
"gitbranch": "BRANCH=$(git symbolic-ref HEAD 2>/dev/null | cut -d\"/\" -f 3); if [[ \"$BRANCH\" != \"master\" ]]; then echo \"you must be on master branch to release\"; exit 1 ; fi",
9+
"gitbranch": "BRANCH=$(git rev-parse --abbrev-ref HEAD); if [[ \"$BRANCH\" != \"master\" ]]; then echo \"you must be on master branch to release\"; exit 1 ; fi",
1010
"gitstatus": "STATUS=$(git status --porcelain 2>&1); echo $STATUS; if [[ ! -z \"$STATUS\" ]]; then exit 1; fi;",
11+
<<<<<<< Updated upstream
1112
"gittest": "yarn gitbranch; yarn gitstatus",
1213
"preversion": "yarn gittest; yarn test",
14+
=======
15+
"gittest": "yarn gitbranch && yarn gitstatus",
16+
"preversion": "yarn gittest && yarn test",
17+
>>>>>>> Stashed changes
1318
"postversion": "git push --follow-tags"
1419
}
1520
}

0 commit comments

Comments
 (0)