@@ -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 }
0 commit comments