Skip to content

Commit a0e42aa

Browse files
karalabefjl
authored andcommitted
build: mobile CI fixes (#3322)
* build: use metatags on cocoapods, not prerelease tags * build: fix Maven and CocoaPods author email addresses
1 parent 2c80239 commit a0e42aa

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

build/ci.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ func newMavenMetadata(env build.Environment) mavenMetadata {
744744
continue
745745
}
746746
// Split the author and insert as a contributor
747-
re := regexp.MustCompile("([^<]+) <(.+>)")
747+
re := regexp.MustCompile("([^<]+) <(.+)>")
748748
parts := re.FindStringSubmatch(line)
749749
if len(parts) == 3 {
750750
contribs = append(contribs, mavenContributor{Name: parts[1], Email: parts[2]})
@@ -796,7 +796,7 @@ func doXCodeFramework(cmdline []string) {
796796
}
797797
// Prepare and upload a PodSpec to CocoaPods
798798
if *deploy != "" {
799-
meta := newPodMetadata(env)
799+
meta := newPodMetadata(env, archive)
800800
build.Render("build/pod.podspec", meta.Name+".podspec", 0755, meta)
801801
build.MustRunCommand("pod", *deploy, "push", meta.Name+".podspec", "--allow-warnings", "--verbose")
802802
}
@@ -806,6 +806,7 @@ type podMetadata struct {
806806
Name string
807807
Version string
808808
Commit string
809+
Archive string
809810
Contributors []podContributor
810811
}
811812

@@ -814,7 +815,7 @@ type podContributor struct {
814815
Email string
815816
}
816817

817-
func newPodMetadata(env build.Environment) podMetadata {
818+
func newPodMetadata(env build.Environment, archive string) podMetadata {
818819
// Collect the list of authors from the repo root
819820
contribs := []podContributor{}
820821
if authors, err := os.Open("AUTHORS"); err == nil {
@@ -828,7 +829,7 @@ func newPodMetadata(env build.Environment) podMetadata {
828829
continue
829830
}
830831
// Split the author and insert as a contributor
831-
re := regexp.MustCompile("([^<]+) <(.+>)")
832+
re := regexp.MustCompile("([^<]+) <(.+)>")
832833
parts := re.FindStringSubmatch(line)
833834
if len(parts) == 3 {
834835
contribs = append(contribs, podContributor{Name: parts[1], Email: parts[2]})
@@ -841,7 +842,8 @@ func newPodMetadata(env build.Environment) podMetadata {
841842
}
842843
return podMetadata{
843844
Name: name,
844-
Version: archiveVersion(env),
845+
Archive: archive,
846+
Version: build.VERSION() + "+" + env.Commit[:8],
845847
Commit: env.Commit,
846848
Contributors: contribs,
847849
}

build/pod.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Pod::Spec.new do |spec|
1414
spec.ios.vendored_frameworks = 'Frameworks/Geth.framework'
1515

1616
spec.prepare_command = <<-CMD
17-
curl https://gethstore.blob.core.windows.net/builds/geth-ios-all-{{.Version}}.tar.gz | tar -xvz
17+
curl https://gethstore.blob.core.windows.net/builds/{{.Archive}}.tar.gz | tar -xvz
1818
mkdir Frameworks
19-
mv geth-ios-all-{{.Version}}/Geth.framework Frameworks
20-
rm -rf geth-ios-all-{{.Version}}
19+
mv {{.Archive}}/Geth.framework Frameworks
20+
rm -rf {{.Archive}}
2121
CMD
2222
end

0 commit comments

Comments
 (0)