-
Notifications
You must be signed in to change notification settings - Fork 2
/
make_release
executable file
·63 lines (44 loc) · 1.65 KB
/
make_release
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#! /usr/bin/env ruby
require "rubygems"
require "jazzy"
require "katip"
project_name = "HoneyBee"
version_string = ARGV.shift
host_name = "HoneyBee.link"
if version_string == nil
puts "Expected: make_release <version_string>"
exit
end
puts "Versioning"
puts `/usr/libexec/PlistBuddy -c 'Set CFBundleShortVersionString #{version_string}' #{project_name}/Info.plist`
puts `katip ChangeLog.md`
spec = %[
Pod::Spec.new do |s|
s.name = "#{project_name}"
s.version = "#{version_string}"
s.summary = "A swift library to increase the expressiveness of asynchronous and concurrent programming."
s.homepage = "https://lynchsft.github.io/HoneyBee/"
s.documentation_url = s.homepage
s.license = { :type=>"MIT" }
s.author = { "Alex Lynch" => "alex@iamapps.net" }
s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.11"
s.tvos.deployment_target = "10.0"
s.pod_target_xcconfig = { "SWIFT_VERSION" => "5.2" }
s.source = { :git => "https://github.com/lynchsft/HoneyBee.git", :tag=>"v#{version_string}"}
s.source_files = "#{project_name}/*.swift"
end
]
File.open("#{project_name}.podspec",'w') {|f| f.puts spec}
puts "Linting"
puts `pod lib lint`
puts "Documenting"
puts `rm -rf docs/*`
puts `jazzy --xcodebuild-arguments -scheme,#{project_name} --no-hide-documentation-coverage --output ./docs/ --documentation=./*.md `
puts `git add #{project_name}/Info.plist ChangeLog.md #{project_name}.podspec docs`
puts `git commit -m "Mark as v#{version_string}"`
puts `git tag v#{version_string}`
puts `git push`
puts `git push --tags`
puts "Publishing"
puts `pod trunk push --swift-version=5.2 #{project_name}.podspec`