prima-twig 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/twig-circle +51 -0
- data/bin/twig-open-pr +1 -1
- data/bin/twig-review +1 -1
- metadata +3 -3
- data/bin/twig-deploy +0 -83
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c716c024c25c66f63d2191d909dae689c575e95a
|
4
|
+
data.tar.gz: ef65e6652f87fd539305b6e0df765adb247725eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 745640d28a76cbfd14425e6f31b9ac5504d56fe0e7b0b54e074a10e0c59c7c5306be549f1fd20efe9fcf0df8db059bc78544428979d298f21f2950160a0076d6
|
7
|
+
data.tar.gz: 7b4e51b34230cd1817c57970857051ff9685382c2bdbe3b43fa0e1083d67db882d5593d704508df6aa7b39203c77bf691762691d528fe9987987d61aeac5f6a8
|
data/bin/twig-circle
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require_relative '../lib/prima_twig.rb'
|
5
|
+
require 'colorize'
|
6
|
+
require 'highline/import'
|
7
|
+
require 'launchy'
|
8
|
+
|
9
|
+
|
10
|
+
def help_content
|
11
|
+
<<-HELP
|
12
|
+
|
13
|
+
twig-circle
|
14
|
+
===========
|
15
|
+
|
16
|
+
Opens circleci contextual to the current branch
|
17
|
+
|
18
|
+
Synopsis
|
19
|
+
--------
|
20
|
+
|
21
|
+
twig circle [-b|--branch <branch>]
|
22
|
+
|
23
|
+
Description
|
24
|
+
-----------
|
25
|
+
|
26
|
+
Opens circleci contextual to the current branch
|
27
|
+
|
28
|
+
Subcommand for Twig: <http://rondevera.github.io/twig/>
|
29
|
+
Author: Matteo Giachino <https://github.com/matteosister>
|
30
|
+
|
31
|
+
HELP
|
32
|
+
end
|
33
|
+
|
34
|
+
args = ARGV.dup
|
35
|
+
|
36
|
+
if args.include?('--help')
|
37
|
+
puts help_content
|
38
|
+
exit
|
39
|
+
end
|
40
|
+
|
41
|
+
class Circle
|
42
|
+
def initialize
|
43
|
+
@prima = Prima.new
|
44
|
+
end
|
45
|
+
|
46
|
+
def execute
|
47
|
+
Launchy.open("https://circleci.com/gh/#{ @prima.repo_name }/tree/#{ @prima.current_branch_name }")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
Circle.new.execute
|
data/bin/twig-open-pr
CHANGED
data/bin/twig-review
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prima-twig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matteo Giachino
|
@@ -98,13 +98,13 @@ dependencies:
|
|
98
98
|
description: Our tools to manage git, github and trello
|
99
99
|
email: matteo.giachino@prima.it
|
100
100
|
executables:
|
101
|
-
- twig-
|
101
|
+
- twig-circle
|
102
102
|
- twig-open-pr
|
103
103
|
- twig-review
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files: []
|
106
106
|
files:
|
107
|
-
- bin/twig-
|
107
|
+
- bin/twig-circle
|
108
108
|
- bin/twig-open-pr
|
109
109
|
- bin/twig-review
|
110
110
|
- lib/prima_twig.rb
|
data/bin/twig-deploy
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require_relative '../lib/prima_twig.rb'
|
5
|
-
require 'colorize'
|
6
|
-
require 'highline/import'
|
7
|
-
|
8
|
-
|
9
|
-
def help_content
|
10
|
-
<<-HELP
|
11
|
-
|
12
|
-
twig-deploy
|
13
|
-
===========
|
14
|
-
|
15
|
-
Updates master and push to origin
|
16
|
-
|
17
|
-
Synopsis
|
18
|
-
--------
|
19
|
-
|
20
|
-
twig deploy
|
21
|
-
|
22
|
-
Description
|
23
|
-
-----------
|
24
|
-
|
25
|
-
Merges dev in master and push dev and master to origin, than returns to the actual branch
|
26
|
-
|
27
|
-
Subcommand for Twig: <http://rondevera.github.io/twig/>
|
28
|
-
Author: Matteo Giachino <https://github.com/matteosister>
|
29
|
-
|
30
|
-
HELP
|
31
|
-
end
|
32
|
-
|
33
|
-
args = ARGV.dup
|
34
|
-
|
35
|
-
if args.include?('--help')
|
36
|
-
puts help_content
|
37
|
-
exit
|
38
|
-
end
|
39
|
-
|
40
|
-
class Review
|
41
|
-
def initialize
|
42
|
-
@prima = Prima.new
|
43
|
-
end
|
44
|
-
|
45
|
-
def execute
|
46
|
-
if @prima.head_detached?
|
47
|
-
puts 'Head detached'.red
|
48
|
-
exit(1)
|
49
|
-
end
|
50
|
-
|
51
|
-
unless @prima.is_clean?
|
52
|
-
puts 'hai dei file non committati...non posso continuare'.red
|
53
|
-
#exit(1)
|
54
|
-
end
|
55
|
-
|
56
|
-
actual_branch = @prima.current_branch_name
|
57
|
-
puts actual_branch.green
|
58
|
-
|
59
|
-
step 'git fetch'
|
60
|
-
step 'git checkout dev'
|
61
|
-
step 'git merge origin/dev'
|
62
|
-
step 'git checkout master'
|
63
|
-
step 'git merge origin/master'
|
64
|
-
step 'git merge --ff-only dev'
|
65
|
-
step 'git push origin master'
|
66
|
-
step "git checkout #{actual_branch}"
|
67
|
-
|
68
|
-
#puts "Il branch #{ @prima.current_branch_name } è ora in review".green
|
69
|
-
exit 0
|
70
|
-
end
|
71
|
-
|
72
|
-
def step command, output = nil
|
73
|
-
if output
|
74
|
-
puts output
|
75
|
-
else
|
76
|
-
puts command
|
77
|
-
end
|
78
|
-
`#{command}`
|
79
|
-
exit($?.exitstatus) unless 0 === $?.exitstatus
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
Review.new.execute
|