Skip to content

Commit c839028

Browse files
committed
Update Fastfile
1 parent 1a5bf3b commit c839028

File tree

4 files changed

+38
-36
lines changed

4 files changed

+38
-36
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,4 @@ fastlane/test_output
9191
iOSInjectionProject/
9292

9393

94+
scripts/test.sh

CalendarX.xcodeproj/project.pbxproj

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
988A82E2279FFB8A000899B5 /* Preference.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Preference.swift; sourceTree = "<group>"; };
117117
98AB002229A565E8006C6FC7 /* LaunchHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchHelper.swift; sourceTree = "<group>"; };
118118
98AB002429A5670D006C6FC7 /* Updater.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Updater.swift; sourceTree = "<group>"; };
119-
98AB002829A9AD9D006C6FC7 /* LetsMove.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LetsMove.framework; path = "../../Library/Developer/Xcode/DerivedData/LetsMove-ejnlhuwjbufqlvdpzoaailxizupy/Build/Products/Debug/LetsMove.framework"; sourceTree = "<group>"; };
120119
98B5B6C829427A8A00114483 /* TitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleView.swift; sourceTree = "<group>"; };
121120
98B5B6CA294289F900114483 /* RecommendationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendationsView.swift; sourceTree = "<group>"; };
122121
98B5B6CC2942A6D800114483 /* apps.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = apps.json; sourceTree = "<group>"; };
@@ -221,14 +220,6 @@
221220
path = Model;
222221
sourceTree = "<group>";
223222
};
224-
98AB002729A9AD9C006C6FC7 /* Frameworks */ = {
225-
isa = PBXGroup;
226-
children = (
227-
98AB002829A9AD9D006C6FC7 /* LetsMove.framework */,
228-
);
229-
name = Frameworks;
230-
sourceTree = "<group>";
231-
};
232223
98C9BD0B29099A2C00F645AD /* Settings */ = {
233224
isa = PBXGroup;
234225
children = (
@@ -297,7 +288,6 @@
297288
children = (
298289
98D573D027571EB3001C2D8C /* CalendarX */,
299290
98D573CF27571EB3001C2D8C /* Products */,
300-
98AB002729A9AD9C006C6FC7 /* Frameworks */,
301291
);
302292
sourceTree = "<group>";
303293
};

fastlane/Fastfile

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,56 @@ default_platform(:mac)
33
platform :mac do
44

55
lane :package do
6-
setup
6+
setup(name: ENV["APP_NAME"], version: ENV["APP_VERSION"])
77
build
88
clean
9+
end
910

11+
lane :test do |options|
12+
setup(name: options[:name], version: options[:version])
13+
build
14+
clean
1015
end
1116

12-
13-
private_lane :setup do
14-
app_name = ENV["APP_NAME"]
17+
lane :release do |options|
18+
19+
name = options[:name]
20+
repo = options[:repo]
21+
tag = options[:tag]
22+
token = options[:token]
23+
24+
github_release = set_github_release(
25+
repository_name: repo,
26+
api_token: token,
27+
name: tag,
28+
tag_name: tag,
29+
description: (File.read("../TEST.md") rescue "No changelog provided"),
30+
upload_assets: ["#{name}.dmg"])
31+
end
32+
33+
lane :show do
34+
msg = File.read("../TEST.md")
35+
UI.message msg
36+
end
37+
38+
private_lane :setup do |options|
39+
40+
name = options[:name]
41+
version = options[:version]
42+
1543
commit = last_git_commit
1644
date = Time.now.utc.localtime("+08:00").strftime("%Y.%m.%d %k:%M")
17-
version = ENV["APP_VERSION"]
18-
path = "#{app_name}/Info.plist"
45+
path = "#{name}/Info.plist"
1946

20-
increment_version_number_in_xcodeproj(version_number: version, scheme: app_name)
21-
increment_build_number_in_xcodeproj(build_number: version, scheme: app_name)
47+
increment_version_number_in_xcodeproj(version_number: version, scheme: name)
48+
increment_build_number_in_xcodeproj(build_number: version, scheme: name)
2249
set_info_plist_value(path: path, key: "CommitHash", value: commit[:abbreviated_commit_hash])
2350
set_info_plist_value(path: path, key: "CommitDate", value: date)
24-
51+
2552
end
2653

27-
2854
private_lane :build do
55+
2956
build_app(
3057
clean: true,
3158
silent: true,

fastlane/README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,6 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
2323

2424

2525

26-
### mac build
27-
28-
```sh
29-
[bundle exec] fastlane mac build
30-
```
31-
32-
33-
34-
### mac clean
35-
36-
```sh
37-
[bundle exec] fastlane mac clean
38-
```
39-
40-
41-
4226
----
4327

4428
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

0 commit comments

Comments
 (0)