We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ad4711 commit 4b2ceb5Copy full SHA for 4b2ceb5
1 file changed
bin/release
@@ -0,0 +1,30 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+IFS=$'\n\t'
4
+set -vx
5
+
6
+if [ -z "${1:-}" ]; then
7
+ echo "Usage: $0 <version>"
8
+ exit 1
9
+fi
10
11
+VERSION=$1
12
+VERSION_FILE="lib/graphql/groups/version.rb"
13
+GEM_SPEC="graphql-groups.gemspec"
14
+GEM_NAME="graphql-groups"
15
16
+sed -i "s/VERSION = '.*'/VERSION = '${VERSION}'/" "$VERSION_FILE"
17
18
+bundle install
19
20
+gem build "$GEM_SPEC"
21
+gem push "${GEM_NAME}-${VERSION}.gem"
22
23
+git add "$VERSION_FILE" Gemfile.lock
24
+git commit -m "v${VERSION}"
25
+git tag -m "Release ${VERSION}" "v${VERSION}"
26
27
+CURRENT_BRANCH=$(git branch --show-current)
28
+git push origin "$CURRENT_BRANCH" --tags
29
30
+rm "${GEM_NAME}-${VERSION}.gem"
0 commit comments