-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
38 lines (30 loc) · 1.01 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
## [ Build ] ###################################################################
desc "Open the project in Xcode"
task :build do
sh "swift build"
end
## [ Xcode ] ###################################################################
desc "Open the project in Xcode"
task :xcode do
project = "./MaterialFormSwiftUI.xcodeproj"
sh "open #{project}"
end
## [ Deploy ] ##################################################################
desc "Deploys new version of a binary, by pushing passed tag"
task :deploy do
ARGV.each { |a| task a.to_sym do ; end }
version = ARGV[1].to_s
if version
sh("git tag #{version} && git push --tags")
sh("pod trunk push")
end
end
## [ Helpers ] #################################################################
desc "Purge Derived data"
task :purge do
sh("rm -rf ~/Library/Developer/Xcode/DerivedData/*")
end
def print_info(str)
(red,clr) = (`tput colors`.chomp.to_i >= 8) ? %W(\e[33m \e[m) : ["", ""]
puts red, "== #{str.chomp} ==", clr
end