-
Notifications
You must be signed in to change notification settings - Fork 37
Feature/automation upload #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…es; renaming ExportCodesignFiles to CollectCodesignFiles
…cified for automatic upload
cmd/xcode.go
Outdated
| xcodeCmd.Flags().StringVar(¶mXcodeScheme, "scheme", "", "Xcode Scheme") | ||
| xcodeCmd.Flags().StringVar(¶mXcodebuildSDK, "xcodebuild-sdk", "", "xcodebuild -sdk param. If a value is specified for this flag it'll be passed to xcodebuild as the value of the -sdk flag. For more info about the values please see xcodebuild's -sdk flag docs. Example value: iphoneos") | ||
| // Flags used to automatically upload artifacts | ||
| xcodeCmd.Flags().BoolVar(&isWriteFiles, "write-files", true, "Set wether to export artifacts to a local directory.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls also add this to the xamarin and uitest scanner, may these could be root level flags
cmd/xcode.go
Outdated
| xcodeCmd.Flags().StringVar(¶mXcodebuildSDK, "xcodebuild-sdk", "", "xcodebuild -sdk param. If a value is specified for this flag it'll be passed to xcodebuild as the value of the -sdk flag. For more info about the values please see xcodebuild's -sdk flag docs. Example value: iphoneos") | ||
| // Flags used to automatically upload artifacts | ||
| xcodeCmd.Flags().BoolVar(&isWriteFiles, "write-files", true, "Set wether to export artifacts to a local directory.") | ||
| xcodeCmd.Flags().StringVar(&personalAccessToken, "auth-token", "", "Personal access token. In case app-slug parameter is also provided, will automatically upload artifacts to bitrise.io.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would mention that these flags are working only together:
Personal access token. Requires app-slug flag to be defined as well and will cause the codesigning file to be uploaded automatically
cmd/xcode.go
Outdated
| absExportOutputDirPath, err := initExportOutputDir() | ||
| if err != nil { | ||
| return fmt.Errorf("failed to prepare Export directory: %s", err) | ||
| absExportOutputDirPath := "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: var absExportOutputDirPath string, would explicitly show that we do not care / use the default value of the var
cmd/xcode.go
Outdated
| if err != nil { | ||
| return err | ||
| } | ||
| certsUploaded, provProfilesUploaded, err := codesign.UploadAndWriteCodesignFiles(certificatesToExport, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls leave a comment that certificatesOnly will lead to 0 elements certsUploaded, that's why no need to pass it further
gows.yml
Outdated
| @@ -1 +1 @@ | |||
| package_name: github.com/bitrise-tools/codesigndoc | |||
| package_name: github.com/bitrise-io/codesigndoc | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be removed as we do not use gows this days
godrei
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls have a look at my notes
lszucs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, looks good otherwise.
bitriseio/bitrise/profile.go
Outdated
| // UploadProvisioningProfile ... | ||
| func (client *Client) UploadProvisioningProfile(uploadURL string, uploadFileName string, outputDirPath string, exportFileName string) error { | ||
| log.Printf("Upload %s to Bitrise...", exportFileName) | ||
| func (client *Client) UploadProvisioningProfile(uploadURL string, uploadFileName string, content io.Reader) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment and previously: uploadFileName is used only in the logging statement.
bitriseio/bitrise/certificate.go
Outdated
| // UploadIdentity ... | ||
| func (client *Client) UploadIdentity(uploadURL string, uploadFileName string, outputDirPath string, exportFileName string) error { | ||
| func (client *Client) UploadIdentity(uploadURL string, uploadFileName string, exportFileName string, content io.Reader) error { | ||
| log.Printf("Upload %s to Bitrise...", exportFileName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exportFileName is used only in the log statement, however, the logging could be done on the caller side.
In that case, the parameter is not needed and the function is cleaner in terms of the log output it produces
lszucs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me, although I am not a subject matter expert.
godrei
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls have a look at my notes
No description provided.