fastlane-plugin-dmg 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +7 -6
- data/lib/fastlane/plugin/dmg/actions/dmg_action.rb +32 -3
- data/lib/fastlane/plugin/dmg/helper/dmg_helper.rb +4 -0
- data/lib/fastlane/plugin/dmg/version.rb +1 -1
- metadata +47 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3426b07d3ccedb1c7a5af9caf08df3552b6fd2d87f85399b29a8c2835bb38609
|
4
|
+
data.tar.gz: fb86acd9948a0ff1c7d1da67217aff6a1c8e13041c6ba074b228fc070b63685f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f42cd6876ca071e09b16875f350355acd8664531360461e5ce59d6e483c3e8d147a00730e387558e261fe469d6772b857da4615e21cf3bcfae5b69665bea415b
|
7
|
+
data.tar.gz: 9beeb83d766744dcda1bae3f02c99a6d62b67b198c8ba8881b66121dd4cd38f281ff487801a4a98160cbbb60da87e89df1c4acb5c8c769e665f5203547729ea7
|
data/README.md
CHANGED
@@ -20,12 +20,13 @@ Easily create DMG for your Mac app
|
|
20
20
|
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
21
21
|
|
22
22
|
```ruby
|
23
|
-
dmg(path: "/some/myapp/",
|
24
|
-
output_path: "/some/myapp.dmg",
|
25
|
-
volume_name: "myapp",
|
26
|
-
filesystem: "hfs+",
|
27
|
-
format: "udzo",
|
28
|
-
|
23
|
+
dmg(path: "/some/myapp/", # required
|
24
|
+
output_path: "/some/myapp.dmg", # optional, by default will be at the same location as 'myapp' folder
|
25
|
+
volume_name: "myapp", # optional, by default will be the same as input folder name
|
26
|
+
filesystem: "hfs+", # optional, default is 'hfs+'
|
27
|
+
format: "udzo", # optional, default is 'udzo'
|
28
|
+
create_applications_symlink: true, # optional, default is true
|
29
|
+
size: 10) # in megabytes, optional, by default will be calculated as input folder size + 10%
|
29
30
|
```
|
30
31
|
|
31
32
|
## Run tests for this plugin
|
@@ -1,10 +1,15 @@
|
|
1
|
+
require 'fastlane/action'
|
2
|
+
require 'fastlane/boolean'
|
3
|
+
require 'fastlane_core/configuration/config_item'
|
1
4
|
require 'tmpdir'
|
2
5
|
|
6
|
+
require_relative '../helper/dmg_helper'
|
7
|
+
|
3
8
|
module Fastlane
|
4
9
|
module Actions
|
5
10
|
class DmgAction < Action
|
6
11
|
def self.run(params)
|
7
|
-
UI.message
|
12
|
+
UI.message("Creating dmg from #{params[:path]}...")
|
8
13
|
|
9
14
|
input_path = params[:path]
|
10
15
|
|
@@ -23,13 +28,30 @@ module Fastlane
|
|
23
28
|
absolute_output_dir = File.expand_path("..", absolute_output_path)
|
24
29
|
FileUtils.mkdir_p(absolute_output_dir)
|
25
30
|
|
31
|
+
# Append "/." to path if the path doesn't end with it
|
32
|
+
unless input_path.end_with?("/.")
|
33
|
+
input_path += "/."
|
34
|
+
end
|
35
|
+
|
26
36
|
Dir.mktmpdir('fldmg') do |dir|
|
37
|
+
# Copy to temp folder
|
27
38
|
FileUtils.cp_r(input_path, dir)
|
28
39
|
|
29
|
-
|
40
|
+
# Remove .DS_Store if copied
|
41
|
+
ds_store_filepath = "#{dir}/.DS_Store"
|
42
|
+
if File.exist?(ds_store_filepath)
|
43
|
+
File.delete(ds_store_filepath)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Create /Applications symlink if required
|
47
|
+
if params[:create_applications_symlink]
|
48
|
+
File.symlink("/Applications", "#{dir}/Applications")
|
49
|
+
end
|
50
|
+
|
51
|
+
Actions.sh("hdiutil create -fs #{params[:filesystem]} -volname #{params[:volume_name].shellescape} -srcfolder #{File.expand_path(dir).shellescape} -ov -format #{params[:format]} -size #{params[:size]}m #{absolute_output_path.shellescape}")
|
30
52
|
end
|
31
53
|
|
32
|
-
UI.success
|
54
|
+
UI.success("Successfully generated dmg image at path #{absolute_output_path}")
|
33
55
|
return absolute_output_path
|
34
56
|
end
|
35
57
|
|
@@ -69,6 +91,7 @@ module Fastlane
|
|
69
91
|
output_path: "Latest.dmg",
|
70
92
|
volume_name: "MyApp",
|
71
93
|
filesystem: "HFS+",
|
94
|
+
create_applications_symlink: true,
|
72
95
|
size: 25
|
73
96
|
)'
|
74
97
|
]
|
@@ -100,6 +123,12 @@ module Fastlane
|
|
100
123
|
description: "The format of the resulting image",
|
101
124
|
default_value: "UDZO",
|
102
125
|
optional: true),
|
126
|
+
FastlaneCore::ConfigItem.new(key: :create_applications_symlink,
|
127
|
+
env_name: "FL_ADD_APPS_SYMLINK",
|
128
|
+
description: "Flag for creating /Applications symlink",
|
129
|
+
default_value: true,
|
130
|
+
type: Fastlane::Boolean,
|
131
|
+
optional: true),
|
103
132
|
FastlaneCore::ConfigItem.new(key: :size,
|
104
133
|
env_name: "FL_DMG_SIZE",
|
105
134
|
description: "Size of the resulting dmg file in megabytes",
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-dmg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Dvoryanskiy
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -25,7 +25,21 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: fastlane
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.211.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.211.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - ">="
|
@@ -39,7 +53,7 @@ dependencies:
|
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
@@ -53,7 +67,7 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
@@ -67,7 +81,7 @@ dependencies:
|
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: rspec_junit_formatter
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - ">="
|
@@ -86,16 +100,16 @@ dependencies:
|
|
86
100
|
requirements:
|
87
101
|
- - '='
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
103
|
+
version: 1.22.3
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - '='
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: 1.22.3
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: rubocop-performance
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
@@ -109,20 +123,34 @@ dependencies:
|
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
126
|
+
name: rubocop-require_tools
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
114
142
|
requirements:
|
115
143
|
- - ">="
|
116
144
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
145
|
+
version: '0'
|
118
146
|
type: :development
|
119
147
|
prerelease: false
|
120
148
|
version_requirements: !ruby/object:Gem::Requirement
|
121
149
|
requirements:
|
122
150
|
- - ">="
|
123
151
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
125
|
-
description:
|
152
|
+
version: '0'
|
153
|
+
description:
|
126
154
|
email: advoryanskiy@gmail.com
|
127
155
|
executables: []
|
128
156
|
extensions: []
|
@@ -138,7 +166,7 @@ homepage: https://github.com/advoryanskiy/fastlane-plugin-dmg
|
|
138
166
|
licenses:
|
139
167
|
- MIT
|
140
168
|
metadata: {}
|
141
|
-
post_install_message:
|
169
|
+
post_install_message:
|
142
170
|
rdoc_options: []
|
143
171
|
require_paths:
|
144
172
|
- lib
|
@@ -146,16 +174,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
174
|
requirements:
|
147
175
|
- - ">="
|
148
176
|
- !ruby/object:Gem::Version
|
149
|
-
version: '
|
177
|
+
version: '2.6'
|
150
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
179
|
requirements:
|
152
180
|
- - ">="
|
153
181
|
- !ruby/object:Gem::Version
|
154
182
|
version: '0'
|
155
183
|
requirements: []
|
156
|
-
|
157
|
-
|
158
|
-
signing_key:
|
184
|
+
rubygems_version: 3.4.2
|
185
|
+
signing_key:
|
159
186
|
specification_version: 4
|
160
187
|
summary: Easily create dmg for your Mac app
|
161
188
|
test_files: []
|