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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ca096a6d69e14dead32f7c5fa03291fb52876d6
4
- data.tar.gz: c8b754a8a14d5f600451afbf372e6d7b0de18b44
3
+ metadata.gz: 79431ec8eb567ca01d3707853c04640c5e970d8c
4
+ data.tar.gz: a6a8cc0b3f52f7a0e8ac046d9620fc1c45a80e00
5
5
  SHA512:
6
- metadata.gz: 89767bad0b339e341ab326e724460fe654b5a90535b48df29e8026d76aaeef547f5ae3f384a03630bd68f16763e6ecb33a7c55cf08c5c718d99d30413c7b437e
7
- data.tar.gz: 68fecefd2b6ddb8ef9d8702a4fd83c3f130921266f13c8561b1107fe3894a34e0936965986aad8e9b6ae4e24f4054c2ab18d8a17810b718af9bfb9866d6c4975
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
- ## Basic Usage
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
- 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:
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
- #### Help
36
+ ## Full usage
37
+ ```bash
25
38
 
26
- Usage: lasertag [OPTIONS]
39
+ Usage: lasertag [OPTIONS]
27
40
 
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
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
- when a step fails, it stops the whole process.
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
 
@@ -1,3 +1,3 @@
1
1
  module Lasertag
2
- VERSION = "0.3.2"
2
+ VERSION = '0.3.3'
3
3
  end
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.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - cesarferreira