lasertag 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/lasertag.rb +9 -32
- 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: 612d6c98f05b18868b1e9d47ba82b56f82f5bee5
|
4
|
+
data.tar.gz: 82d82d0acafa559adaad6b0cd8abf0cc6ac9f1ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8de709cf217bca9b543372a9a566e193abdcb2b4a01ad12ef1285711b29d91dca7f7c0544dabe951748d2bcff77bae22223e786f6a0c0dc428b71151def8fef1
|
7
|
+
data.tar.gz: 315d2d6d4a266fc0e7846b5d9a081ba5ae15c6f41ac873c4efd59a2c8c5f71db2bca012cde916401ac38cfe61991e3417e32f2b9ee9dd7f8a21e6fa6b3b0f8dd
|
data/README.md
CHANGED
@@ -24,6 +24,8 @@ This will extract the android's app module `version` and create a matching `git
|
|
24
24
|
$ lasertag --path ~/Project --module app --flavor prod --remote origin
|
25
25
|
```
|
26
26
|
|
27
|
+
> $ lasertag --path <b>~/Project</b> --module app --flavor prod --remote origin
|
28
|
+
|
27
29
|
|
28
30
|
## Handy in
|
29
31
|
|
data/lib/lasertag.rb
CHANGED
@@ -25,6 +25,7 @@ module Lasertag
|
|
25
25
|
|
26
26
|
end
|
27
27
|
|
28
|
+
### Options parser
|
28
29
|
def create_options_parser(args)
|
29
30
|
|
30
31
|
args.options do |opts|
|
@@ -67,36 +68,16 @@ module Lasertag
|
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
70
|
-
|
71
|
-
## Manage options
|
72
|
-
##
|
71
|
+
### Manage options
|
73
72
|
def manage_opts
|
74
73
|
|
75
|
-
if @require_analyses
|
76
|
-
# instatiate android project
|
77
|
-
# android_project = AndroidProject.new(@app_path)
|
78
|
-
|
79
|
-
# # is a valid android project?
|
80
|
-
# unless android_project.is_valid
|
81
|
-
# puts "#{@app_path.red} is not a valid android project"
|
82
|
-
# exit
|
83
|
-
# end
|
84
|
-
end
|
85
|
-
|
86
74
|
unless @app_module
|
87
75
|
puts "Please give me an app module name".yellow
|
88
76
|
exit 1
|
89
77
|
end
|
90
78
|
|
91
|
-
handle_it_all
|
92
|
-
|
93
|
-
end
|
94
|
-
|
95
|
-
def handle_it_all
|
96
|
-
|
97
79
|
Dir.chdir @app_path
|
98
80
|
|
99
|
-
### dont let uncommited stuffgit commit
|
100
81
|
if has_uncommited_code
|
101
82
|
puts "You have uncommited code, please commit it first".red
|
102
83
|
exit 1
|
@@ -113,12 +94,10 @@ module Lasertag
|
|
113
94
|
### Get project properties
|
114
95
|
@hash = project_properties @app_module
|
115
96
|
|
116
|
-
puts "\n"
|
117
|
-
|
118
97
|
### Find app info
|
119
98
|
app_info = get_app_info
|
120
99
|
|
121
|
-
puts "
|
100
|
+
puts "\nFor package #{app_info[:package].yellow}\n"
|
122
101
|
|
123
102
|
### git tag -a "versionNumber" -m "versionName"
|
124
103
|
|
@@ -137,7 +116,7 @@ module Lasertag
|
|
137
116
|
exit 1
|
138
117
|
end
|
139
118
|
|
140
|
-
#$ git push origin
|
119
|
+
#$ git push origin v#{version}
|
141
120
|
push_tag "v#{version}"
|
142
121
|
|
143
122
|
puts "Pushed git commits and tags.".green
|
@@ -202,14 +181,8 @@ module Lasertag
|
|
202
181
|
end
|
203
182
|
end
|
204
183
|
|
205
|
-
def settings_gradle_file(path = @base_path)
|
206
|
-
File.join(path, 'settings.gradle')
|
207
|
-
end
|
208
|
-
|
209
|
-
def is_valid(settings_path = @settings_gradle_path)
|
210
|
-
File.exist?(settings_path)
|
211
|
-
end
|
212
184
|
|
185
|
+
### Convert the app info to an hash
|
213
186
|
def convert_values_to_hash (str)
|
214
187
|
hash = Hash.new
|
215
188
|
|
@@ -227,6 +200,7 @@ module Lasertag
|
|
227
200
|
hash
|
228
201
|
end
|
229
202
|
|
203
|
+
### Get the project properties
|
230
204
|
def project_properties(project=nil)
|
231
205
|
|
232
206
|
project = "#{project}:" if project
|
@@ -236,6 +210,7 @@ module Lasertag
|
|
236
210
|
end
|
237
211
|
|
238
212
|
|
213
|
+
### Get the app info
|
239
214
|
def get_app_info
|
240
215
|
path = get_path_to_merged_manifest
|
241
216
|
handle = File.open(path)
|
@@ -253,6 +228,7 @@ module Lasertag
|
|
253
228
|
}
|
254
229
|
end
|
255
230
|
|
231
|
+
### Path to the merged manifest
|
256
232
|
def get_path_to_merged_manifest
|
257
233
|
build_dir = @hash['buildDir']
|
258
234
|
|
@@ -276,6 +252,7 @@ module Lasertag
|
|
276
252
|
full_path
|
277
253
|
end
|
278
254
|
|
255
|
+
### Assemble command
|
279
256
|
def assemble_command
|
280
257
|
"gradle :#{@app_module}:assemble#{(@app_flavor or "").capitalize}Release"
|
281
258
|
end
|
data/lib/lasertag/version.rb
CHANGED