[ 
https://issues.apache.org/jira/browse/YETUS-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15961477#comment-15961477
 ] 

Suraj Acharya commented on YETUS-315:
-------------------------------------

usage :
{code}
sacharya@sacharya-MBP:~/repos/yetus$ ./precommit/smart-apply-patch.sh 
0001-Bump-version-for-YETUS-315.patch --committer --gpg-sign
Processing: 0001-Bump-version-for-YETUS-315.patch
Patch file 0001-Bump-version-for-YETUS-315.patch copied to /tmp/yetus-3403.31278
Applying the patch:

You need a passphrase to unlock the secret key for
user: "Suraj Acharya <[email protected]>"
2048-bit RSA key, ID CCC7C3A8, created 2017-02-04

Fri Apr  7 16:33:16 CDT 2017
cd /Users/sacharya/repos/yetus
git am --signoff -S --whitespace=fix -p1 /tmp/yetus-3403.31278/patch
Applying: Bump version for YETUS-315
sacharya@sacharya-MBP:~/repos/yetus$ git log --pretty=raw
commit 1673e9720f430a81e712344ba07de5602bcf76c8
tree 4fdddeec8b0ba867378eb61876ba8207926d3e82
parent ad18e4fb96ae9ec603d89c56b33621cbcbdbc8e3
author Suraj Acharya <[email protected]> 1488433867 +0530
committer Suraj Acharya <[email protected]> 1491600796 -0500
gpgsig -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1

 iQEcBAABAgAGBQJY6AWcAAoJEIB5NPzMx8OoWN0H/Rkdh8JBjvywZaTWPLcBVBp3
 Bp5ryXUAHAZm2H3qzvZLT3UB5l3jyj6Je1fD03wsf9ThfRPuFsIj3ITGtWBbMXEl
 6JizFlGl9M+pAR45PJvVDspbcwjlMiIsfEkokz2wQEp9f2dl7ECniglfMqL8ZFq9
 BD4gh1LQ4J8r1Ic45EsReCLzFbgC+V5OSNz0I0EUStIrPV4wJ0d2JlRfppj1rmgG
 ZjD5+d+P53orYrW/eWNPpxhZvwPU5sgo2MkX1oyiNsOMJLYEJyXjVCieKfF0wrKM
 +6R0mK2NuFKMkARz0nIRhECEPhDiWYDkr1FKcwM4+N6VT8Y8yiqRPacxIes1fVQ=
 =rqmg
 -----END PGP SIGNATURE-----

    Bump version for YETUS-315

    Signed-off-by: Suraj Acharya <[email protected]>

{code}

Help :
{code}
sacharya@sacharya-MBP:~/repos/yetus$ ./precommit/smart-apply-patch.sh --help
smart-apply-patch.sh [OPTIONS] patch

Where:
  patch is a file, URL, or bugsystem-compatible location of the patch file

Options:

--committer             Apply patches like a boss.
--debug                 If set, then output some extra stuff to stderr
--dry-run               Check for patch viability without applying
--gpg-sign              GPG sign the commit using gpg keys
--list-plugins          List all installed plug-ins and then exit
--modulelist=<list>     Specify additional modules to test (comma delimited)
--offline               Avoid connecting to the Internet
--patch-dir=<dir>       The directory for working and output files (default 
'/tmp/yetus-(random))
--personality=<file>    he personality file to load
--plugins=<list>        Specify which plug-ins to add/delete (comma delimited; 
use 'all' for all found)
--project=<name>        The short name for project currently using test-patch 
(default 'yetus')
--skip-system-plugins   Do not load plugins from 
/Users/sacharya/repos/yetus/precommit/test-patch.d
--user-plugins=<dir>    A directory of user provided plugins. see test-patch.d 
for examples (default empty)
--version               Print release version information and exit

Shell binary overrides:
--awk-cmd=<cmd>     The 'awk' command to use (default 'awk')
--curl-cmd=<cmd>    The 'curl' command to use (default 'curl')
--diff-cmd=<cmd>    The GNU-compatible 'diff' command to use (default 'diff')
--file-cmd=<cmd>    The 'file' command to use (default 'file')
--git-cmd=<cmd>     The 'git' command to use (default 'git')
--grep-cmd=<cmd>    The 'grep' command to use (default 'grep')
--patch-cmd=<cmd>   The 'patch' command to use (default 'patch')
--sed-cmd=<cmd>     The 'sed' command to use (default 'sed')
{code}

Without {{--gpg-sign}}
{code}
sacharya@sacharya-MBP:~/repos/yetus$ ./precommit/smart-apply-patch.sh 
0001-Bump-version-for-YETUS-315.patch --committer
Processing: 0001-Bump-version-for-YETUS-315.patch
Patch file 0001-Bump-version-for-YETUS-315.patch copied to 
/tmp/yetus-17398.16971
Applying the patch:
Fri Apr  7 16:32:23 CDT 2017
cd /Users/sacharya/repos/yetus
git am --signoff --whitespace=fix -p1 /tmp/yetus-17398.16971/patch
Applying: Bump version for YETUS-315
{code}

> smart-apply-patch committer mode should support signed commits
> --------------------------------------------------------------
>
>                 Key: YETUS-315
>                 URL: https://issues.apache.org/jira/browse/YETUS-315
>             Project: Yetus
>          Issue Type: New Feature
>          Components: Test Patch
>            Reporter: Allen Wittenauer
>            Assignee: Suraj Acharya
>             Fix For: 0.5.0
>
>
> A new {{--gpg-sign}} flag is added to the smart-apply-patch.sh.
> This will allow the committer to sign the commit.
> GPG Agent will handle the passphrase request.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to