v2gpti 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c40ac095248137c3bf4ac4a8234465ca06918c0
|
4
|
+
data.tar.gz: 6c6004549bc126677b84f527ac086a4d10ffbb82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d56c263e151e31ab44e5e6c516c7f290eb21befdfca4e786cfc3d3e64d13d3b5281b3b6f04857f6fdfc6d0c8720894deac0a9567082899a7c4efd0c1fc00a9a
|
7
|
+
data.tar.gz: 20be0ff915cb2e094f657c1c6eeb4bb5c649c41eede36eb350cbe0d445ded969b0f58d4d92eb3098eff322c09e8b4846586a067a7fb576def0fda8635fb83355
|
data/bin/git-report
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby -U
|
2
|
+
# Git Pivotal Tracker Integration
|
3
|
+
# Copyright (c) 2013 the original author or authors.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
require 'git-pivotal-tracker-integration/command/report'
|
18
|
+
|
19
|
+
GitPivotalTrackerIntegration::Command::Report.new().run ARGV
|
@@ -33,6 +33,13 @@ class GitPivotalTrackerIntegration::Command::Base
|
|
33
33
|
def initialize
|
34
34
|
self.start_logging
|
35
35
|
self.check_version
|
36
|
+
|
37
|
+
git_global_push_default = (GitPivotalTrackerIntegration::Util::Shell.exec "git config --global push.default").chomp
|
38
|
+
if git_global_push_default != "simple"
|
39
|
+
puts "git config --global push.default simple"
|
40
|
+
puts GitPivotalTrackerIntegration::Util::Shell.exec "git config --global push.default simple"
|
41
|
+
end
|
42
|
+
|
36
43
|
@repository_root = GitPivotalTrackerIntegration::Util::Git.repository_root
|
37
44
|
@configuration = GitPivotalTrackerIntegration::Command::Configuration.new
|
38
45
|
@toggl = Toggl.new
|
@@ -48,7 +55,11 @@ class GitPivotalTrackerIntegration::Command::Base
|
|
48
55
|
@toggl.create_time_entry(parameters(configuration, time_spent))
|
49
56
|
end
|
50
57
|
def start_logging
|
51
|
-
$LOG = Logger.new("#{
|
58
|
+
$LOG = Logger.new("#{logger_filename}", 'weekly')
|
59
|
+
end
|
60
|
+
|
61
|
+
def logger_filename
|
62
|
+
return "#{Dir.home}/.v2gpti_local.log"
|
52
63
|
end
|
53
64
|
|
54
65
|
def check_version
|
@@ -69,6 +80,7 @@ class GitPivotalTrackerIntegration::Command::Base
|
|
69
80
|
raise NotImplementedError
|
70
81
|
end
|
71
82
|
|
83
|
+
# Toggl keys
|
72
84
|
# name : The name of the task (string, required, unique in project)
|
73
85
|
# pid : project ID for the task (integer, required)
|
74
86
|
# wid : workspace ID, where the task will be saved (integer, project's workspace id is used when not supplied)
|
@@ -36,6 +36,8 @@ class GitPivotalTrackerIntegration::Command::Finish < GitPivotalTrackerIntegrati
|
|
36
36
|
$LOG.debug("configuration:#{@configuration}")
|
37
37
|
$LOG.debug("project:#{@project}")
|
38
38
|
$LOG.debug("story:#{@configuration.story(@project)}")
|
39
|
+
memm = PivotalTracker::Membership.all(@project)
|
40
|
+
self.commit_new_build
|
39
41
|
time_spent = ""
|
40
42
|
while 1
|
41
43
|
time_spent = ask("How much time did you spend on this task? (example: 15m, 2.5h)")
|
@@ -49,5 +51,27 @@ class GitPivotalTrackerIntegration::Command::Finish < GitPivotalTrackerIntegrati
|
|
49
51
|
end
|
50
52
|
|
51
53
|
|
54
|
+
def commit_new_build
|
55
|
+
# Update version and build numbers
|
56
|
+
build_number = Time.now.utc.strftime("%y%m%d-%H%M")
|
52
57
|
|
58
|
+
puts "build_number:#{build_number}"
|
59
|
+
project_directory = ((GitPivotalTrackerIntegration::Util::Shell.exec 'find . -name "*.xcodeproj" 2>/dev/null').split /\/(?=[^\/]*$)/)[0]
|
60
|
+
working_directory = (GitPivotalTrackerIntegration::Util::Shell.exec "pwd").chop
|
61
|
+
puts "working_directory:#{working_directory}*"
|
62
|
+
|
63
|
+
# cd to the project_directory
|
64
|
+
Dir.chdir(project_directory)
|
65
|
+
|
66
|
+
# set build number and project number in project file
|
67
|
+
GitPivotalTrackerIntegration::Util::Shell.exec "pwd"
|
68
|
+
puts GitPivotalTrackerIntegration::Util::Shell.exec "xcrun agvtool new-version -all #{build_number}", false
|
69
|
+
puts GitPivotalTrackerIntegration::Util::Shell.exec "xcrun agvtool new-marketing-version SNAPSHOT"
|
70
|
+
|
71
|
+
# cd back to the working_directory
|
72
|
+
Dir.chdir(working_directory)
|
73
|
+
|
74
|
+
# Create a new build commit, push to develop
|
75
|
+
GitPivotalTrackerIntegration::Util::Git.create_commit( "Update build number to #{build_number}", @configuration.story(@project))
|
76
|
+
end
|
53
77
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Git Pivotal Tracker Integration
|
2
|
+
# Copyright (c) 2013 the original author or authors.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
16
|
+
require 'git-pivotal-tracker-integration/command/base'
|
17
|
+
require 'git-pivotal-tracker-integration/command/command'
|
18
|
+
require 'git-pivotal-tracker-integration/util/git'
|
19
|
+
require 'git-pivotal-tracker-integration/util/story'
|
20
|
+
require 'git-pivotal-tracker-integration/version-update/gradle'
|
21
|
+
|
22
|
+
|
23
|
+
class GitPivotalTrackerIntegration::Command::Report < GitPivotalTrackerIntegration::Command::Base
|
24
|
+
|
25
|
+
|
26
|
+
def run(args)
|
27
|
+
|
28
|
+
owned_by = "Jeff Wolski" # hard coded to Jeff Wolski for now
|
29
|
+
|
30
|
+
|
31
|
+
$LOG.debug("#{self.class} in project:#{@project.name} pwd:#{(GitPivotalTrackerIntegration::Util::Shell.exec 'pwd').chop} branch:#{GitPivotalTrackerIntegration::Util::Git.branch_name}")
|
32
|
+
bug_title = nil
|
33
|
+
if args.length == 1
|
34
|
+
bug_title = args[0]
|
35
|
+
end
|
36
|
+
# puts bug_title
|
37
|
+
if bug_title.nil? || bug_title.empty?
|
38
|
+
abort "\nUsage example:\n\n git report \"Issue running deliver command\" \n"
|
39
|
+
end
|
40
|
+
|
41
|
+
report_note = ""
|
42
|
+
while (report_note.nil? || report_note.empty?)
|
43
|
+
report_note = ask("Description of bug:")
|
44
|
+
end
|
45
|
+
|
46
|
+
current_user = (GitPivotalTrackerIntegration::Util::Shell.exec "git config user.name").chomp
|
47
|
+
bug_title = "User Reported - #{current_user} - #{bug_title}"
|
48
|
+
current_user_email = (GitPivotalTrackerIntegration::Util::Shell.exec "git config user.email").chomp
|
49
|
+
bug_description = "#{current_user_email}\n#{report_note}"
|
50
|
+
|
51
|
+
bug_story = PivotalTracker::Story.new
|
52
|
+
bug_story.project_id = @project.id
|
53
|
+
bug_story.owned_by = owned_by
|
54
|
+
bug_story.story_type = "bug"
|
55
|
+
bug_story.name = bug_title
|
56
|
+
bug_story.description = bug_description
|
57
|
+
bug_story.labels = "userreported"
|
58
|
+
uploaded_story = bug_story.create
|
59
|
+
uploaded_story.upload_attachment(self.logger_filename)
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: v2gpti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Hale
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: highline
|
@@ -214,6 +214,7 @@ executables:
|
|
214
214
|
- git-deliver
|
215
215
|
- git-finish
|
216
216
|
- git-release
|
217
|
+
- git-report
|
217
218
|
- git-start
|
218
219
|
extensions: []
|
219
220
|
extra_rdoc_files: []
|
@@ -224,6 +225,7 @@ files:
|
|
224
225
|
- bin/git-deliver
|
225
226
|
- bin/git-finish
|
226
227
|
- bin/git-release
|
228
|
+
- bin/git-report
|
227
229
|
- bin/git-start
|
228
230
|
- lib/git-pivotal-tracker-integration/command/base.rb
|
229
231
|
- lib/git-pivotal-tracker-integration/command/command.rb
|
@@ -232,6 +234,7 @@ files:
|
|
232
234
|
- lib/git-pivotal-tracker-integration/command/finish.rb
|
233
235
|
- lib/git-pivotal-tracker-integration/command/prepare-commit-msg.sh
|
234
236
|
- lib/git-pivotal-tracker-integration/command/release.rb
|
237
|
+
- lib/git-pivotal-tracker-integration/command/report.rb
|
235
238
|
- lib/git-pivotal-tracker-integration/command/start.rb
|
236
239
|
- lib/git-pivotal-tracker-integration/util/git.rb
|
237
240
|
- lib/git-pivotal-tracker-integration/util/shell.rb
|