Skip to content

Commit

Permalink
Small fixes for prerelease 2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoHood committed Jun 14, 2017
1 parent 5406bab commit c8fc2b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ GPGit dependencies can be easily installed via [pip](https://pypi.python.org/pyp
```bash
# Install dependencies
sudo apt-get install python3 python3-pip gnupg2 git
VERSION=2.0.4
VERSION=2.0.5

# Download and verify source
wget https://github.com/NicoHood/gpgit/releases/download/${VERSION}/gpgit-${VERSION}.tar.xz
Expand Down
10 changes: 7 additions & 3 deletions gpgit.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ def analyze(self):
self.setstatus(1, 'NOTE', 'Please use a strong, unique, secret passphrase')

else:
# Check if Git username and email is set
if not self.config['username']or not self.config['email']:
return 'Please set your email and username with: "git config --global user.email <email>" and "git config --global user.name <name>"'

# Generate a new key
self.setstatus(2, 'TODO', 'Generating an RSA 4096 GPG key for '
+ self.config['username'] + ' ' + self.config['email']
Expand Down Expand Up @@ -327,7 +331,7 @@ def analyze(self):
self.setstatus(1, 'OK', 'Git already configured with your GPG key')

# Check commit signing
if self.config['gpgsign'].lower() == 'true':
if self.config['gpgsign'] and self.config['gpgsign'].lower() == 'true':
self.setstatus(2, 'OK', 'Commit signing already enabled')
else:
self.setstatus(2, 'TODO', 'Enabling ' + self.config['config_level'] + ' commit signing')
Expand Down Expand Up @@ -716,7 +720,7 @@ def substep2(self):

class GPGit(object):
"""Class that manages GPGit steps and substeps analysis, print and execution."""
version = '2.0.2'
__version__ = '2.0.5'

colormap = {
'OK': Colors.GREEN,
Expand Down Expand Up @@ -911,7 +915,7 @@ def main():
+ 'signing Git sources via GPG.')
parser.add_argument('tag', action='store',
help='Tagname of the release. E.g. "1.0.0" or "20170521".')
parser.add_argument('-v', '--version', action='version', version='GPGit ' + GPGit.version)
parser.add_argument('-v', '--version', action='version', version='GPGit ' + GPGit.__version__)
parser.add_argument('-m', '--message', action='store', help='tag message')
parser.add_argument('-o', '--output', action='store',
help='output path of the archive, signature and message digest')
Expand Down

0 comments on commit c8fc2b9

Please sign in to comment.