build: use metatags on cocoapods, not prerelease tags

This commit is contained in:
Péter Szilágyi 2016-11-22 13:57:19 +02:00
parent 2c802399c3
commit 87a9b34d91
No known key found for this signature in database
GPG key ID: 119A76381CCB7DD2
2 changed files with 8 additions and 6 deletions

View file

@ -796,7 +796,7 @@ func doXCodeFramework(cmdline []string) {
}
// Prepare and upload a PodSpec to CocoaPods
if *deploy != "" {
meta := newPodMetadata(env)
meta := newPodMetadata(env, archive)
build.Render("build/pod.podspec", meta.Name+".podspec", 0755, meta)
build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings", "--verbose")
}
@ -806,6 +806,7 @@ type podMetadata struct {
Name string
Version string
Commit string
Archive string
Contributors []podContributor
}
@ -814,7 +815,7 @@ type podContributor struct {
Email string
}
func newPodMetadata(env build.Environment) podMetadata {
func newPodMetadata(env build.Environment, archive string) podMetadata {
// Collect the list of authors from the repo root
contribs := []podContributor{}
if authors, err := os.Open("AUTHORS"); err == nil {
@ -841,7 +842,8 @@ func newPodMetadata(env build.Environment) podMetadata {
}
return podMetadata{
Name: name,
Version: archiveVersion(env),
Archive: archive,
Version: build.VERSION() + "+" + env.Commit[:8],
Commit: env.Commit,
Contributors: contribs,
}

View file

@ -14,9 +14,9 @@ Pod::Spec.new do |spec|
spec.ios.vendored_frameworks = 'Frameworks/Geth.framework'
spec.prepare_command = <<-CMD
curl https://gethstore.blob.core.windows.net/builds/geth-ios-all-{{.Version}}.tar.gz | tar -xvz
curl https://gethstore.blob.core.windows.net/builds/{{.Archive}}.tar.gz | tar -xvz
mkdir Frameworks
mv geth-ios-all-{{.Version}}/Geth.framework Frameworks
rm -rf geth-ios-all-{{.Version}}
mv {{.Archive}}/Geth.framework Frameworks
rm -rf {{.Archive}}
CMD
end