|
|
@ -744,7 +744,7 @@ func newMavenMetadata(env build.Environment) mavenMetadata { |
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
// Split the author and insert as a contributor
|
|
|
|
// Split the author and insert as a contributor
|
|
|
|
re := regexp.MustCompile("([^<]+) <(.+>)") |
|
|
|
re := regexp.MustCompile("([^<]+) <(.+)>") |
|
|
|
parts := re.FindStringSubmatch(line) |
|
|
|
parts := re.FindStringSubmatch(line) |
|
|
|
if len(parts) == 3 { |
|
|
|
if len(parts) == 3 { |
|
|
|
contribs = append(contribs, mavenContributor{Name: parts[1], Email: parts[2]}) |
|
|
|
contribs = append(contribs, mavenContributor{Name: parts[1], Email: parts[2]}) |
|
|
@ -796,7 +796,7 @@ func doXCodeFramework(cmdline []string) { |
|
|
|
} |
|
|
|
} |
|
|
|
// Prepare and upload a PodSpec to CocoaPods
|
|
|
|
// Prepare and upload a PodSpec to CocoaPods
|
|
|
|
if *deploy != "" { |
|
|
|
if *deploy != "" { |
|
|
|
meta := newPodMetadata(env) |
|
|
|
meta := newPodMetadata(env, archive) |
|
|
|
build.Render("build/pod.podspec", meta.Name+".podspec", 0755, meta) |
|
|
|
build.Render("build/pod.podspec", meta.Name+".podspec", 0755, meta) |
|
|
|
build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings", "--verbose") |
|
|
|
build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings", "--verbose") |
|
|
|
} |
|
|
|
} |
|
|
@ -806,6 +806,7 @@ type podMetadata struct { |
|
|
|
Name string |
|
|
|
Name string |
|
|
|
Version string |
|
|
|
Version string |
|
|
|
Commit string |
|
|
|
Commit string |
|
|
|
|
|
|
|
Archive string |
|
|
|
Contributors []podContributor |
|
|
|
Contributors []podContributor |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -814,7 +815,7 @@ type podContributor struct { |
|
|
|
Email string |
|
|
|
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
|
|
|
|
// Collect the list of authors from the repo root
|
|
|
|
contribs := []podContributor{} |
|
|
|
contribs := []podContributor{} |
|
|
|
if authors, err := os.Open("AUTHORS"); err == nil { |
|
|
|
if authors, err := os.Open("AUTHORS"); err == nil { |
|
|
@ -828,7 +829,7 @@ func newPodMetadata(env build.Environment) podMetadata { |
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
// Split the author and insert as a contributor
|
|
|
|
// Split the author and insert as a contributor
|
|
|
|
re := regexp.MustCompile("([^<]+) <(.+>)") |
|
|
|
re := regexp.MustCompile("([^<]+) <(.+)>") |
|
|
|
parts := re.FindStringSubmatch(line) |
|
|
|
parts := re.FindStringSubmatch(line) |
|
|
|
if len(parts) == 3 { |
|
|
|
if len(parts) == 3 { |
|
|
|
contribs = append(contribs, podContributor{Name: parts[1], Email: parts[2]}) |
|
|
|
contribs = append(contribs, podContributor{Name: parts[1], Email: parts[2]}) |
|
|
@ -841,7 +842,8 @@ func newPodMetadata(env build.Environment) podMetadata { |
|
|
|
} |
|
|
|
} |
|
|
|
return podMetadata{ |
|
|
|
return podMetadata{ |
|
|
|
Name: name, |
|
|
|
Name: name, |
|
|
|
Version: archiveVersion(env), |
|
|
|
Archive: archive, |
|
|
|
|
|
|
|
Version: build.VERSION() + "+" + env.Commit[:8], |
|
|
|
Commit: env.Commit, |
|
|
|
Commit: env.Commit, |
|
|
|
Contributors: contribs, |
|
|
|
Contributors: contribs, |
|
|
|
} |
|
|
|
} |
|
|
|