lasertag 0.3.2 → 0.3.3
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/README.md +28 -13
- data/lib/lasertag.rb +9 -0
- data/lib/lasertag/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79431ec8eb567ca01d3707853c04640c5e970d8c
|
4
|
+
data.tar.gz: a6a8cc0b3f52f7a0e8ac046d9620fc1c45a80e00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4390a66da2a2a4e36294b2d0785cbcf0ec13ff73de76c354d9af6e58d413197433e0b5b219fbda1d80dca1775c1012f0c35f41582bbed80c45f5a575f30fdb3c
|
7
|
+
data.tar.gz: 6b91c86d014177538c5177d044bb5cc644c47a9d00e2e83b9fbdfc4bb44ae5ab6a29b10fbf77bdf5df22578133af2bc69cf432bff47ead32d9583e0df36ee975
|
data/README.md
CHANGED
@@ -10,29 +10,44 @@
|
|
10
10
|
</p>
|
11
11
|
|
12
12
|
|
13
|
-
##
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
This will extract the android's app module `version` and create a matching `git tag`.
|
14
16
|
|
15
17
|
$ lasertag --module [module_name]
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
+
|
20
|
+
|
21
|
+
<b>A bit more complex usage:</b>
|
22
|
+
|
23
|
+
```bash
|
24
|
+
$ lasertag --path ~/Project --module app --flavor prod --remote origin
|
25
|
+
```
|
26
|
+
|
27
|
+
|
28
|
+
## Handy in
|
29
|
+
|
30
|
+
Pretty handy in situations like the most used git workflow, the [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow), a strict branching model designed around the project release:
|
19
31
|
|
20
32
|
<p align="center">
|
21
33
|
<img src="extras/gitflow.png" />
|
22
34
|
</p>
|
23
35
|
|
24
|
-
|
36
|
+
## Full usage
|
37
|
+
```bash
|
25
38
|
|
26
|
-
|
39
|
+
Usage: lasertag [OPTIONS]
|
27
40
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
41
|
+
Options
|
42
|
+
-m, --module MODULE # Specifies the app module
|
43
|
+
-f, --flavor FLAVOR # Specifies the flavor (e.g. dev, qa, prod)
|
44
|
+
-p, --path PATH # Custom path to android project
|
45
|
+
-d, --dont-push # Only tags the code, doesn't push it upstream
|
46
|
+
-r, --remote REMOTE # Custom remote to your project (default: "origin")
|
47
|
+
-h, --help # Displays help
|
48
|
+
-v, --version # Displays version
|
35
49
|
|
50
|
+
```
|
36
51
|
|
37
52
|
## Installation
|
38
53
|
|
@@ -45,7 +60,7 @@ Pretty helpful in situations like my personal choice of git workflow, the [Gitfl
|
|
45
60
|
- executes git tag -a v[tag_version] -m "tag [tag_name]"
|
46
61
|
- executes git push origin [tag_name]
|
47
62
|
|
48
|
-
|
63
|
+
Whenever a step fails, it stops the whole process and rolls it back.
|
49
64
|
|
50
65
|
## License
|
51
66
|
|
data/lib/lasertag.rb
CHANGED
@@ -13,6 +13,7 @@ module Lasertag
|
|
13
13
|
@app_module = nil
|
14
14
|
@app_flavor = nil
|
15
15
|
@app_remote = 'origin'
|
16
|
+
@allow_push = true
|
16
17
|
|
17
18
|
@require_analyses = true
|
18
19
|
|
@@ -47,6 +48,10 @@ module Lasertag
|
|
47
48
|
@app_remote = app_remote
|
48
49
|
end
|
49
50
|
|
51
|
+
opts.on('-d', '--dont-push', 'Only tags the code, doesn\'t push it upstream') do |dont|
|
52
|
+
@allow_push = false
|
53
|
+
end
|
54
|
+
|
50
55
|
opts.on('-h', '--help', 'Displays help') do
|
51
56
|
@require_analyses = false
|
52
57
|
puts opts.help
|
@@ -128,6 +133,10 @@ module Lasertag
|
|
128
133
|
tag_code "v#{version}"
|
129
134
|
puts "Tagged v#{version}.".green
|
130
135
|
|
136
|
+
unless @allow_push
|
137
|
+
exit 1
|
138
|
+
end
|
139
|
+
|
131
140
|
#$ git push origin v1.5
|
132
141
|
push_tag "v#{version}"
|
133
142
|
|
data/lib/lasertag/version.rb
CHANGED