diff --git a/go.mod b/go.mod index 057b456..1b9a265 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/bitrise-io/go-utils v1.0.1 github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.1 github.com/bitrise-io/go-xcode v1.0.2 - github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.10 + github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.11 howett.net/plist v1.0.0 ) diff --git a/go.sum b/go.sum index 62b936d..d4dbcd8 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,8 @@ github.com/bitrise-io/go-utils/v2 v2.0.0-alpha.1/go.mod h1:sy+Ir1X8P3tAAx/qU/r+h github.com/bitrise-io/go-xcode v1.0.1/go.mod h1:Y0Wu2dXm0MilJ/4D3+gPHaNMlUcP+1DjIPoLPykq7wY= github.com/bitrise-io/go-xcode v1.0.2 h1:Uv/cBOJ/qZpitjOpyS8orafee3wk66OwvRTbqA2fr+4= github.com/bitrise-io/go-xcode v1.0.2/go.mod h1:Y0Wu2dXm0MilJ/4D3+gPHaNMlUcP+1DjIPoLPykq7wY= -github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.10 h1:fL+rOyxRXZADO3o4UKCUFsO3Fr83G+r8fbH4BnzOvls= -github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.10/go.mod h1:6YbvyYwZgSTt96CQSQ6QlrkcRiv3ssX8zLijh2TPnbU= +github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.11 h1:g2e1BcYQaF/vJatXQ/IbTWJuEdGVTrnz8dADtSawsdU= +github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.11/go.mod h1:6YbvyYwZgSTt96CQSQ6QlrkcRiv3ssX8zLijh2TPnbU= github.com/bitrise-io/pkcs12 v0.0.0-20211108084543-e52728e011c8 h1:kmvU8AxrNTxXsVPKepBHD8W+eCVmeaKyTkRuUJB2K38= github.com/bitrise-io/pkcs12 v0.0.0-20211108084543-e52728e011c8/go.mod h1:UiXKNs0essbC14a2TvGlnUKo9isP9m4guPrp8KJHJpU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/profiles.go b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/profiles.go index f36d920..322d4e2 100644 --- a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/profiles.go +++ b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/profiles.go @@ -4,6 +4,7 @@ import ( "net/http" "strings" + "github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/time" "github.com/bitrise-io/go-xcode/xcodeproject/serialized" ) @@ -85,7 +86,7 @@ type ProfileAttributes struct { CreatedDate string `json:"createdDate"` ProfileState ProfileState `json:"profileState"` ProfileType ProfileType `json:"profileType"` - ExpirationDate Time `json:"expirationDate"` + ExpirationDate time.Time `json:"expirationDate"` } // Profile ... diff --git a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/spaceship/profiles.go b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/spaceship/profiles.go index e0f4e99..73df42f 100644 --- a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/spaceship/profiles.go +++ b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/spaceship/profiles.go @@ -5,11 +5,11 @@ import ( "encoding/json" "errors" "fmt" - "time" "github.com/bitrise-io/go-utils/log" "github.com/bitrise-io/go-xcode/v2/autocodesign" "github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect" + "github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/time" ) const ( @@ -105,7 +105,7 @@ func newProfile(p ProfileInfo) (autocodesign.Profile, error) { ProfileState: appstoreconnect.ProfileState(p.Status), ProfileContent: contents, Platform: p.Platform, - ExpirationDate: appstoreconnect.Time(p.Expiry), + ExpirationDate: time.Time(p.Expiry), }, id: p.ID, bundleID: p.BundleID, diff --git a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/time.go b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/time/time.go similarity index 68% rename from vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/time.go rename to vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/time/time.go index 3e21e84..7554641 100644 --- a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect/time.go +++ b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/time/time.go @@ -1,4 +1,4 @@ -package appstoreconnect +package time import ( "fmt" @@ -29,6 +29,14 @@ func (t *Time) UnmarshalJSON(b []byte) error { } func timeFormats() []string { + formats := []string{time.RFC3339} + formats = append(formats, appleKeyAuthTimeFormats()...) + formats = append(formats, appleIDAuthTimeFormats()...) + + return formats +} + +func appleKeyAuthTimeFormats() []string { // Apple is using an ISO 8601 time format (https://en.wikipedia.org/wiki/ISO_8601). In this format the offset from // the UTC time can have the following equivalent and interchangeable formats: // * [+/-]07:00 @@ -39,8 +47,15 @@ func timeFormats() []string { // Go has built in support for ISO 8601 but only for the zero offset UTC and the [+/-]07:00 format under time.RFC3339. // We still need to check for the other two. return []string{ - time.RFC3339, "2006-01-02T15:04:05.000-0700", "2006-01-02T15:04:05.000-07", } } + +func appleIDAuthTimeFormats() []string { + // Spaceship returns this time format when setting SPACESHIP_AVOID_XCODE_API=true. This is needed because Apple's + // API started to return an error for the old spaceship implementation. + return []string{ + "2006-01-02 15:04:05 UTC", + } +} diff --git a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/localcodesignasset/profileconverter.go b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/localcodesignasset/profileconverter.go index 4904cbb..add4296 100644 --- a/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/localcodesignasset/profileconverter.go +++ b/vendor/github.com/bitrise-io/go-xcode/v2/autocodesign/localcodesignasset/profileconverter.go @@ -6,6 +6,7 @@ import ( "github.com/bitrise-io/go-xcode/profileutil" "github.com/bitrise-io/go-xcode/v2/autocodesign" "github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect" + "github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/time" ) // ProvisioningProfileConverter ... @@ -38,7 +39,7 @@ func (c provisioningProfileConverter) ProfileInfoToProfile(info profileutil.Prov UUID: info.UUID, ProfileContent: content, Platform: getBundleIDPlatform(info.Type), - ExpirationDate: appstoreconnect.Time(info.ExpirationDate), + ExpirationDate: time.Time(info.ExpirationDate), }, id: "", // only in case of Developer Portal Profiles bundleID: info.BundleID, diff --git a/vendor/modules.txt b/vendor/modules.txt index cbdffea..27d1656 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -50,7 +50,7 @@ github.com/bitrise-io/go-xcode/xcodeproject/serialized github.com/bitrise-io/go-xcode/xcodeproject/xcodeproj github.com/bitrise-io/go-xcode/xcodeproject/xcscheme github.com/bitrise-io/go-xcode/xcodeproject/xcworkspace -# github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.10 +# github.com/bitrise-io/go-xcode/v2 v2.0.0-alpha.11 ## explicit; go 1.16 github.com/bitrise-io/go-xcode/v2/autocodesign github.com/bitrise-io/go-xcode/v2/autocodesign/certdownloader @@ -59,6 +59,7 @@ github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnect github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/appstoreconnectclient github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/spaceship +github.com/bitrise-io/go-xcode/v2/autocodesign/devportalclient/time github.com/bitrise-io/go-xcode/v2/autocodesign/keychain github.com/bitrise-io/go-xcode/v2/autocodesign/localcodesignasset github.com/bitrise-io/go-xcode/v2/autocodesign/projectmanager