gonative-cli 1.2.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/Gemfile.lock +5 -5
- data/lib/gonative/commands/android/publish.rb +1 -1
- data/lib/gonative/commands/ios/version.rb +15 -0
- data/lib/gonative/commands.rb +1 -0
- data/lib/gonative/dsl/error_catchable.rb +3 -3
- data/lib/gonative/dsl/serviceable.rb +1 -1
- data/lib/gonative/plugins/ios/helpers/spec_reader.rb +21 -0
- data/lib/gonative/plugins/ios/helpers.rb +10 -0
- data/lib/gonative/plugins/ios/release.rb +12 -17
- data/lib/gonative/plugins/ios/version.rb +18 -0
- data/lib/gonative/utils/ui.rb +10 -0
- data/lib/gonative/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b6ecdffb0ef7622a9e2c4bbab226dcfabb7fcfd6c2b812f0e9d4492af2ab78c
|
4
|
+
data.tar.gz: 61205ced579aa0787db3fc4cf88fd958d916c4a00a6aece6381f8114b234c4b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ebb2cf3a39e5e4a4390a4427b74443aff3f4f4bfdadb2b9e409e88fe4009340608a34ad801dc52e2e66bf622f9c74f2f27b7d3af85ed5a29e196d87eecbaace
|
7
|
+
data.tar.gz: 9703f0d27285ee645e3311cead965481442957b47bc0d1e9396c95667a87dc780d9250b8af70af30434f9f55499a97c889fb34b078445ddda508edd78223248c
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gonative-cli (1.2.
|
4
|
+
gonative-cli (1.2.2)
|
5
5
|
activesupport (~> 6.0)
|
6
6
|
cocoapods (~> 1.10)
|
7
7
|
colorize (~> 0.8.0)
|
@@ -29,10 +29,10 @@ GEM
|
|
29
29
|
atomos (0.1.3)
|
30
30
|
byebug (11.1.3)
|
31
31
|
claide (1.1.0)
|
32
|
-
cocoapods (1.12.
|
32
|
+
cocoapods (1.12.1)
|
33
33
|
addressable (~> 2.8)
|
34
34
|
claide (>= 1.0.2, < 2.0)
|
35
|
-
cocoapods-core (= 1.12.
|
35
|
+
cocoapods-core (= 1.12.1)
|
36
36
|
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
37
37
|
cocoapods-downloader (>= 1.6.0, < 2.0)
|
38
38
|
cocoapods-plugins (>= 1.0.0, < 2.0)
|
@@ -47,7 +47,7 @@ GEM
|
|
47
47
|
nap (~> 1.0)
|
48
48
|
ruby-macho (>= 2.3.0, < 3.0)
|
49
49
|
xcodeproj (>= 1.21.0, < 2.0)
|
50
|
-
cocoapods-core (1.12.
|
50
|
+
cocoapods-core (1.12.1)
|
51
51
|
activesupport (>= 5.0, < 8)
|
52
52
|
addressable (~> 2.8)
|
53
53
|
algoliasearch (~> 1.0)
|
@@ -144,7 +144,7 @@ GEM
|
|
144
144
|
colored2 (~> 3.1)
|
145
145
|
nanaimo (~> 0.3.0)
|
146
146
|
rexml (~> 3.2.4)
|
147
|
-
zeitwerk (2.6.
|
147
|
+
zeitwerk (2.6.8)
|
148
148
|
|
149
149
|
PLATFORMS
|
150
150
|
arm64-darwin-21
|
data/lib/gonative/commands.rb
CHANGED
@@ -11,6 +11,7 @@ module GoNative
|
|
11
11
|
register 'ios embed-extensions', IOS::EmbedExtensions
|
12
12
|
register 'ios set-bundle-id', IOS::SetBundleId
|
13
13
|
register 'ios rename', IOS::Rename
|
14
|
+
register 'ios version', IOS::Version
|
14
15
|
|
15
16
|
register 'android create', Android::Create
|
16
17
|
register 'android publish', Android::Publish
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cocoapods'
|
4
|
+
|
5
|
+
module GoNative
|
6
|
+
module Plugins
|
7
|
+
module IOS
|
8
|
+
module Helpers
|
9
|
+
module SpecReader
|
10
|
+
def spec_name
|
11
|
+
@spec_name ||= Dir.entries('.').select { |s| s.end_with? '.podspec' }.first
|
12
|
+
end
|
13
|
+
|
14
|
+
def spec
|
15
|
+
@spec ||= Pod::Specification.from_file(spec_name)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -7,8 +7,9 @@ module GoNative
|
|
7
7
|
module IOS
|
8
8
|
class Release
|
9
9
|
extend DSL::Serviceable
|
10
|
+
include Helpers::SpecReader
|
10
11
|
|
11
|
-
GONATIVE_SOURCE_NAME = 'gonative-specs'
|
12
|
+
GONATIVE_SOURCE_NAME = 'gonative-specs'
|
12
13
|
|
13
14
|
def call
|
14
15
|
Utils::UI.info 'Linting and releasing pod'
|
@@ -24,7 +25,7 @@ module GoNative
|
|
24
25
|
def assert_spec_exists!
|
25
26
|
return if spec_name
|
26
27
|
|
27
|
-
raise Error,
|
28
|
+
raise Error, 'No podspec file exists'
|
28
29
|
end
|
29
30
|
|
30
31
|
def assert_not_pushed!
|
@@ -33,30 +34,24 @@ module GoNative
|
|
33
34
|
|
34
35
|
pushed_versions = source.versions(name)&.collect(&:to_s)
|
35
36
|
|
36
|
-
|
37
|
-
|
37
|
+
if pushed_versions&.include? version.to_s
|
38
|
+
raise Error,
|
39
|
+
"#{name} (#{version}) has already been pushed to #{source.name}"
|
40
|
+
end
|
38
41
|
end
|
39
42
|
|
40
43
|
def create_and_push_tag!
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
44
|
+
return if system("git tag | grep #{spec.version} > /dev/null")
|
45
|
+
|
46
|
+
system "git add -A && git commit -m \"Releases #{spec.version}.\""
|
47
|
+
system "git tag #{spec.version}"
|
48
|
+
system 'git push && git push --tags'
|
46
49
|
end
|
47
50
|
|
48
51
|
def push_to_pod_repo!
|
49
52
|
system "pod repo push #{GONATIVE_SOURCE_NAME} #{spec_name} --private --allow-warnings"
|
50
53
|
end
|
51
54
|
|
52
|
-
def spec_name
|
53
|
-
@spec_name ||= Dir.entries(".").select { |s| s.end_with? ".podspec" }.first
|
54
|
-
end
|
55
|
-
|
56
|
-
def spec
|
57
|
-
@spec ||= Pod::Specification.from_file(spec_name)
|
58
|
-
end
|
59
|
-
|
60
55
|
def source
|
61
56
|
@source ||= sources_manager.source_with_name_or_url(GONATIVE_SOURCE_NAME)
|
62
57
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cocoapods'
|
4
|
+
|
5
|
+
module GoNative
|
6
|
+
module Plugins
|
7
|
+
module IOS
|
8
|
+
class Version
|
9
|
+
extend DSL::Serviceable
|
10
|
+
include Helpers::SpecReader
|
11
|
+
|
12
|
+
def call
|
13
|
+
Utils::UI.output(spec.version)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/gonative/utils/ui.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# frozen_string_literal: true\
|
2
4
|
|
3
5
|
require 'colorize'
|
@@ -9,6 +11,14 @@ module GoNative
|
|
9
11
|
def info(msg)
|
10
12
|
puts msg.colorize(:green)
|
11
13
|
end
|
14
|
+
|
15
|
+
def output(msg)
|
16
|
+
puts msg
|
17
|
+
end
|
18
|
+
|
19
|
+
def error(msg)
|
20
|
+
puts msg.colorize(:red)
|
21
|
+
end
|
12
22
|
end
|
13
23
|
end
|
14
24
|
end
|
data/lib/gonative/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gonative-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hunaid Hassan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- lib/gonative/commands/ios/publish.rb
|
197
197
|
- lib/gonative/commands/ios/rename.rb
|
198
198
|
- lib/gonative/commands/ios/set_bundle_id.rb
|
199
|
+
- lib/gonative/commands/ios/version.rb
|
199
200
|
- lib/gonative/commands/version.rb
|
200
201
|
- lib/gonative/dsl/error_catchable.rb
|
201
202
|
- lib/gonative/dsl/serviceable.rb
|
@@ -204,10 +205,13 @@ files:
|
|
204
205
|
- lib/gonative/plugins/ios/create.rb
|
205
206
|
- lib/gonative/plugins/ios/embed_extensions.rb
|
206
207
|
- lib/gonative/plugins/ios/extract_extensions.rb
|
208
|
+
- lib/gonative/plugins/ios/helpers.rb
|
209
|
+
- lib/gonative/plugins/ios/helpers/spec_reader.rb
|
207
210
|
- lib/gonative/plugins/ios/release.rb
|
208
211
|
- lib/gonative/plugins/ios/rename.rb
|
209
212
|
- lib/gonative/plugins/ios/set_bundle_id.rb
|
210
213
|
- lib/gonative/plugins/ios/verify.rb
|
214
|
+
- lib/gonative/plugins/ios/version.rb
|
211
215
|
- lib/gonative/utils.rb
|
212
216
|
- lib/gonative/utils/content_evaluator.rb
|
213
217
|
- lib/gonative/utils/sanitize_plugin_name.rb
|