diff --git a/pkg/circle/build.go b/pkg/circle/build.go index 5654f30e..0864bc01 100644 --- a/pkg/circle/build.go +++ b/pkg/circle/build.go @@ -4,6 +4,7 @@ import ( "bytes" "io" "strconv" + "strings" circleci "github.com/jszwedko/go-circleci" ) @@ -20,7 +21,7 @@ func (c *Client) Builds(pull string, job string, limit, offset int) ([]*circleci var jbuild []*circleci.Build for _, b := range bs { if j, ok := b.BuildParameters["CIRCLE_JOB"]; ok { - if j == job { + if strings.HasPrefix(j, job) { jbuild = append(jbuild, b) } diff --git a/server/handler.go b/server/handler.go index 2b6d6f8b..963091ac 100644 --- a/server/handler.go +++ b/server/handler.go @@ -17,10 +17,11 @@ import ( ) const ( - BUNDLE_ID = "chat.berty.ios" - APP_NAME = "berty" - IOS_JOB = "client.rn.ios" - ANDROID_JOB = "client.rn.android" + BUNDLE_ID = "chat.berty.ios" + APP_NAME = "berty" + IOS_JOB = "client.rn.ios" + IOS_HOUSE_JOB = "client.rn.ios-beta" + ANDROID_JOB = "client.rn.android" ) var reIPA = regexp.MustCompile("/([^/]+).ipa$") @@ -199,6 +200,10 @@ func (s *Server) ListReleaseIOS(c echo.Context) error { return s.ListRelease(c, IOS_JOB) } +func (s *Server) ListReleaseIOSBeta(c echo.Context) error { + return s.ListRelease(c, IOS_HOUSE_JOB) +} + func (s *Server) ListRelease(c echo.Context, job string) error { html := `` + faviconHTMLHeader + `
` @@ -307,6 +312,9 @@ func (s *Server) ListRelease(c echo.Context, job string) error { var href string switch job { + case IOS_HOUSE_JOB: + iosToken := s.getHash(prBranch) + href = fmt.Sprintf(`itms-services://?action=download-manifest&url=https://%s/auth/itms/release/%s/%s`, s.hostname, iosToken, prBranch) case IOS_JOB: iosToken := s.getHash(prBranch) href = fmt.Sprintf(`itms-services://?action=download-manifest&url=https://%s/auth/itms/release/%s/%s`, s.hostname, iosToken, prBranch) diff --git a/server/server.go b/server/server.go index 49f3b5ac..4e31f622 100644 --- a/server/server.go +++ b/server/server.go @@ -106,6 +106,7 @@ func NewServer(cfg *ServerConfig) *Server { e.GET("/release/ios/*", s.ReleaseIOS) e.GET("/release/ios", s.ListReleaseIOS) + e.GET("/release/beta/ios", s.ListReleaseIOSBeta) e.GET("/release/android", s.ListReleaseAndroid) e.GET("/", func(c echo.Context) error { header := c.Request().Header