Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: add support for subkeys in release tools #4807

Closed
wants to merge 0 commits into from

Conversation

MylesBorins
Copy link
Contributor

Replace grep with awk to add support for subkeys

/cc @rvagg @jasnell @Fishrock123 @nodejs/build

@MylesBorins MylesBorins added the tools Issues and PRs related to the tools directory. label Jan 21, 2016
@@ -20,7 +20,7 @@ signcmd=dist-sign

echo "# Selecting GPG key ..."

gpgkey=$(gpg --list-secret-keys | grep '^sec' | awk -F'( +|/)' '{print $3}')
gpgkey=$(gpg --list-secret-keys | grep -E '^sec|^ssb' | awk -F'( +|/)' '{print $3}')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not 100% we want to be using the -E flag here. Personally I don't see a problem, but perhaps we want to solve this without using an extended regular expression

@Fishrock123
Copy link
Contributor

As a note, my subkey works, but it always prints the "GPG key for \"${version}\" tag is not yours, cannot sign" error. (Because something detects my master key instead, and git ends up signing with a subkey. (I think?))

@MylesBorins
Copy link
Contributor Author

Any thoughts on this @rvagg ?

@rvagg
Copy link
Member

rvagg commented Jan 26, 2016

Yeah, this works, I was working up a complicated solution in my head but the fact that this simply prompts you to choose makes it a simple fix! Good thinking.

grep '^sec\|^ssb' works without the -E but we may as well just roll it up into the awk with:

gpgkey=$(gpg --list-secret-keys | awk -F'( +|/)' '/^(sec|ssb)/{print $3}')

lgtm with that change.

@MylesBorins
Copy link
Contributor Author

@rvagg I added the change and rebased against master

@rvagg
Copy link
Member

rvagg commented Jan 26, 2016

lgtm, I think you can probably land this at will now, thanks @thealphanerd!

MylesBorins added a commit to MylesBorins/node that referenced this pull request Jan 26, 2016
Replace grep with awk to add support for subkeys

PR-URL: nodejs#4807
Reviewed-By: Rod Vagg <rod@vagg.org>
@MylesBorins
Copy link
Contributor Author

Landed in 321162d

@MylesBorins MylesBorins deleted the support-sub-keys branch January 26, 2016 22:20
rvagg pushed a commit that referenced this pull request Jan 27, 2016
Replace grep with awk to add support for subkeys

PR-URL: #4807
Reviewed-By: Rod Vagg <rod@vagg.org>
benjamingr pushed a commit to benjamingr/io.js that referenced this pull request Jan 27, 2016
Replace grep with awk to add support for subkeys

PR-URL: nodejs#4807
Reviewed-By: Rod Vagg <rod@vagg.org>
MylesBorins added a commit that referenced this pull request Jan 28, 2016
Replace grep with awk to add support for subkeys

PR-URL: #4807
Reviewed-By: Rod Vagg <rod@vagg.org>
rvagg pushed a commit that referenced this pull request Feb 8, 2016
Replace grep with awk to add support for subkeys

PR-URL: #4807
Reviewed-By: Rod Vagg <rod@vagg.org>
MylesBorins added a commit to MylesBorins/node that referenced this pull request Feb 13, 2016
Replace grep with awk to add support for subkeys

PR-URL: nodejs#4807
Reviewed-By: Rod Vagg <rod@vagg.org>
MylesBorins added a commit to MylesBorins/node that referenced this pull request Feb 15, 2016
Replace grep with awk to add support for subkeys

PR-URL: nodejs#4807
Reviewed-By: Rod Vagg <rod@vagg.org>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Replace grep with awk to add support for subkeys

PR-URL: nodejs#4807
Reviewed-By: Rod Vagg <rod@vagg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants