Skip to content

Commit 29b8774

Browse files
committed
update build and gemspec
1 parent 75e2eb1 commit 29b8774

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ vendor/gems/
1414
*.crt
1515
*.csr
1616
*.secret
17+
hooks-ruby-*.gem

hooks.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Gem::Specification.new do |spec|
1515

1616
spec.homepage = "https://github.com/github/hooks"
1717
spec.metadata = {
18-
"source_code_uri" => "https://github.com/github/hooks",
19-
"documentation_uri" => "https://github.com/github/hooks",
2018
"bug_tracker_uri" => "https://github.com/github/hooks/issues"
2119
}
2220

script/build

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ set -e
44

55
source script/env "$@"
66

7-
GEM_NAME=$(ls | grep gemspec | cut -d. -f1)
8-
GEM_VERSION=$(gem build $GEM_NAME.gemspec 2>&1 | grep Version | cut -d':' -f 2 | tr -d " \t\n\r")
7+
GEMSPEC_NAME="$(basename *.gemspec .gemspec)"
8+
GEM_NAME=$(ruby -e "spec = Gem::Specification.load('$GEMSPEC_NAME.gemspec'); puts spec.name")
9+
GEM_VERSION=$(ruby -e "spec = Gem::Specification.load('$GEMSPEC_NAME.gemspec'); puts spec.version")
10+
11+
gem build $GEMSPEC_NAME.gemspec
912

1013
if [[ "$CI" == "true" ]]; then
1114
echo "gem_name=$GEM_NAME" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)