lasertag 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -4
- data/extras/gitflow.png +0 -0
- data/lib/lasertag/version.rb +1 -1
- data/lib/lasertag.rb +13 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04084b2ac6f3c0611e281a61b69aa8b161dde091
|
4
|
+
data.tar.gz: 7b29b46562469fd1ad3a6f342d814a3916773c90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4293c7cd83e03fa48a9c6475b87e75d36b7097c1bd4a07ad13de54d898757cf34899e1524d123ba9332a56a8b60043e094127e509fc888dd3a1d71c69876e7d
|
7
|
+
data.tar.gz: b643a7e2a885a6a5ef4c6dbf9a84ae9ff6b9aeeaa69b58c674d0b4c23a3f26c86c4b333b2bca54f6705be5c8d04b077ec01cca2997a17f505e70f3514edd3704
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<!-- Match your CVS tags with your android versions with laser speed! -->
|
7
7
|
|
8
8
|
<p align="center">
|
9
|
-
<img src="
|
9
|
+
<img src="extras/terminal.gif" />
|
10
10
|
</p>
|
11
11
|
|
12
12
|
|
@@ -14,11 +14,24 @@
|
|
14
14
|
|
15
15
|
$ lasertag --module [module_name]
|
16
16
|
|
17
|
-
|
17
|
+
This will extract the android's app module `version` and create a matching `git tag`.
|
18
|
+
Pretty helpful in situations like my personal choice of git workflow, the [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow), a strict branching model designed around the project release:
|
18
19
|
|
19
|
-
|
20
|
+
<p align="center">
|
21
|
+
<img src="extras/gitflow.png" />
|
22
|
+
</p>
|
23
|
+
|
24
|
+
#### Help
|
25
|
+
|
26
|
+
Usage: lasertag [OPTIONS]
|
20
27
|
|
21
|
-
|
28
|
+
Options
|
29
|
+
-m, --module MODULE # Specifies the app module
|
30
|
+
-f, --flavor FLAVOR # Specifies the flavor (e.g. dev, qa, prod)
|
31
|
+
-p, --path PATH # Custom path to android project
|
32
|
+
-r, --remote REMOTE # Custom remote to your project (default: "origin")
|
33
|
+
-h, --help # Displays help
|
34
|
+
-v, --version # Displays version
|
22
35
|
|
23
36
|
|
24
37
|
## Installation
|
@@ -32,6 +45,7 @@ If you want to specify a flavor:
|
|
32
45
|
- executes git tag -a v[tag_version] -m "tag [tag_name]"
|
33
46
|
- executes git push origin [tag_name]
|
34
47
|
|
48
|
+
when a step fails, it stops the whole process.
|
35
49
|
|
36
50
|
## License
|
37
51
|
|
data/extras/gitflow.png
ADDED
Binary file
|
data/lib/lasertag/version.rb
CHANGED
data/lib/lasertag.rb
CHANGED
@@ -12,6 +12,7 @@ module Lasertag
|
|
12
12
|
@app_path = Dir.pwd
|
13
13
|
@app_module = nil
|
14
14
|
@app_flavor = nil
|
15
|
+
@app_remote = 'origin'
|
15
16
|
|
16
17
|
@require_analyses = true
|
17
18
|
|
@@ -42,6 +43,10 @@ module Lasertag
|
|
42
43
|
@app_path = app_path if @app_path != '.'
|
43
44
|
end
|
44
45
|
|
46
|
+
opts.on('-r REMOTE', '--remote REMOTE', 'Custom remote to your project (default: "origin")') do |app_remote|
|
47
|
+
@app_remote = app_remote
|
48
|
+
end
|
49
|
+
|
45
50
|
opts.on('-h', '--help', 'Displays help') do
|
46
51
|
@require_analyses = false
|
47
52
|
puts opts.help
|
@@ -139,16 +144,22 @@ module Lasertag
|
|
139
144
|
end
|
140
145
|
|
141
146
|
### PUSH TAG
|
142
|
-
def push_tag(
|
147
|
+
def push_tag(tag)
|
143
148
|
g = Git.open(Dir.pwd)
|
144
149
|
begin
|
145
|
-
g.push(g.remote(
|
150
|
+
g.push(g.remote(@app_remote), tag)
|
146
151
|
rescue Exception => e
|
147
152
|
puts "Can't push tag\n reason: #{e.to_s.red}"
|
153
|
+
delete_tag tag
|
148
154
|
exit 1
|
149
155
|
end
|
150
156
|
end
|
151
157
|
|
158
|
+
### DELETE TAG
|
159
|
+
def delete_tag(tag)
|
160
|
+
g = Git.open(Dir.pwd)
|
161
|
+
g.delete_tag(tag)
|
162
|
+
end
|
152
163
|
|
153
164
|
### TAG CODE
|
154
165
|
def tag_code(version)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lasertag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cesarferreira
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- README.md
|
125
125
|
- Rakefile
|
126
126
|
- bin/lasertag
|
127
|
+
- extras/gitflow.png
|
127
128
|
- extras/terminal.gif
|
128
129
|
- lasertag.gemspec
|
129
130
|
- lib/lasertag.rb
|