pr-changelog 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/chlog +10 -11
- data/lib/pr_changelog_utils.rb +28 -4
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9db33b58231b65ae761fc37f5afbcee7e5c29367
|
4
|
+
data.tar.gz: b6cbded739746c388064e2e7dd9d1a5090c98d8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32d4047f47bb24dc41db38525372d7ef72cf0c45beda40ba8379fbaf1762eef07de2d07f6daee2a907e433b17532fcaba1e09ccc1f8b8fa981dafdb36310ccd1
|
7
|
+
data.tar.gz: c6a764d4f21cd651df2f53aba2ab4c773e4e2e0078a3bf893cca13e86884ed682bd3700ca3c7a6aad5e71d7b61f66af10e20778b883053799a63475616d001b8
|
data/bin/chlog
CHANGED
@@ -14,18 +14,17 @@ command :show do |c|
|
|
14
14
|
c.example 'description', 'command example'
|
15
15
|
c.option '--some-switch', 'Some switch that does something'
|
16
16
|
c.action do |args, options|
|
17
|
-
if !ChangelogUtils.isXcodeDirectory
|
18
|
-
puts "changelog should be used in a xcode directory"
|
19
|
-
else
|
20
|
-
currentVersion = ChangelogUtils.showVersion
|
21
|
-
puts currentVersion
|
22
|
-
puts "=============="
|
23
17
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
18
|
+
ChangelogUtils.validateCurrentDirectory
|
19
|
+
|
20
|
+
currentVersion = ChangelogUtils.showVersion
|
21
|
+
puts currentVersion
|
22
|
+
puts "=============="
|
23
|
+
|
24
|
+
while (ChangelogUtils.showVersion == currentVersion)
|
25
|
+
ChangelogUtils.goBack
|
26
|
+
if (ChangelogUtils.isPullRequestMerge)
|
27
|
+
puts ChangelogUtils.printCurrentChange
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
data/lib/pr_changelog_utils.rb
CHANGED
@@ -13,10 +13,6 @@ class ChangelogUtils
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.isXcodeDirectory
|
17
|
-
projectName = ChangelogUtils.getProjectName
|
18
|
-
return projectName != nil
|
19
|
-
end
|
20
16
|
|
21
17
|
def self.plistFile
|
22
18
|
projectName = ChangelogUtils.getProjectName
|
@@ -61,4 +57,32 @@ class ChangelogUtils
|
|
61
57
|
branch = `git branch --no-color 2> /dev/null`.strip.scan(/\*\s(.*)/)
|
62
58
|
return branch[0][0] if branch.size()>0 and branch[0].size()>0
|
63
59
|
end
|
60
|
+
|
61
|
+
def self.isXcodeDirectory
|
62
|
+
projectName = ChangelogUtils.getProjectName
|
63
|
+
if projectName == nil
|
64
|
+
puts "changelog should be used in a xcode directory"
|
65
|
+
exit
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.validateNoChangeInCurrentWorkspace
|
70
|
+
if `git status -s`.strip != ""
|
71
|
+
puts "you have changes in your repository. Commit or discard changes before using changelog"
|
72
|
+
exit
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.validateGitExists
|
77
|
+
if Dir[".git"].first == nil
|
78
|
+
puts "no git project found. changelog should be used in a git project."
|
79
|
+
exit
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.validateCurrentDirectory
|
84
|
+
ChangelogUtils.validateGitExists
|
85
|
+
ChangelogUtils.validateNoChangeInCurrentWorkspace
|
86
|
+
ChangelogUtils.isXcodeDirectory
|
87
|
+
end
|
64
88
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pr-changelog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cortés
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.1.5
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: mechanize
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '>='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
description: With this gem you can generate a changelog using Pull Requests logs on
|
42
28
|
your local branch
|
43
29
|
email: david@lafosca.cat
|