Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ jobs:
# ensure gem can be built and installed, push to rubygems.org
- run: gem build rubocop-eightyfourcodes
- run: gem install *.gem
- run: gem push *.gem
- run: |
ruby -S gem exec sigstore-cli:0.2.1 sign *.gem --bundle attestation.sigstore.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious... why did you do ruby -S here, versus all the other calls you do gem exec by itself?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied that from the rubygems/release-gem action: https://github.com/rubygems/release-gem/pull/11/files#diff-bbc4dcfa3b9d8c948a1e28efe575fb30910f0f05057fb22735e2245e90a0cbd8R40-R43

I'm not sure it is needed, I didn't think much of it. Actually, I never looked up what -S does, as I trusted @segiddins to know his shit :)

     -S             Makes Ruby use the PATH environment variable to search for
                    script, unless its name begins with a slash.  This is used
                    to emulate #! on machines that don't support it, in the
                    following manner:

                          #! /usr/local/bin/ruby
                          # This line makes the next one a comment in Ruby \
                            exec /usr/local/bin/ruby -S $0 $*

                    On some systems $0 does not always contain the full
                    pathname, so you need the -S switch to tell Ruby to search
                    for the script if necessary (to handle embedded spaces and
                    such).  A better construct than $* would be ${1+"$@"}, but
                    it does not work if the script is being interpreted by
                    csh(1).

Sounds like it doesn't really make sense on the command line, like here, but when using Open3.capture2e it makes more sense?

How did you find this PR @jeffwidman? :)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stumbled across it while researching dependabot/dependabot-core#12025 😄

- run: |
gem push --attestation attestation.sigstore.json *.gem