Skip to content

Conversation

@MylesBorins
Copy link
Contributor

Replace grep with awk to add support for subkeys

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

@MylesBorinsMylesBorins added the tools Issues and PRs related to the tools directory. label Jan 21, 2016
Copy link
ContributorAuthor

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
ContributorAuthor

Any thoughts on this @rvagg ?

@rvagg
Copy link
Member

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
ContributorAuthor

@rvagg I added the change and rebased against master

@rvagg
Copy link
Member

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 <[email protected]>
@MylesBorins
Copy link
ContributorAuthor

Landed in 321162d

@MylesBorinsMylesBorins 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Feb 11, 2016
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@MylesBorins@Fishrock123@rvagg@jasnell