Before I wrotemacOS app script to automate notarize,Because I use Microsoft's HockeyApp input method for crash statistics,So I also need to upload it here once app "publish",So HockeyApp to receive the corresponding version of error statistics。
now,Microsoft has updated HockeyApp become AppCenter,Automated command also very friendly,In fact, this operation can also be added to your automation scripts inside,complete in one step。
/appcenter-cli
We downloaded directly to the official command-line tool: sudo asl install -g appcenter-cli ,After installation,Use the command appcenter setup-autocomplete To add command-line auto-completion,This will be a lot easier。
Then use the command appcenter login ,Such generated Token will automatically save,You do not need to log on each upload。
During appcenter command will ask you a thing or something telemetry,I did not get to know what is directly enabled anyway ...... 0.0。
Gets App list
First of all,AppCenter you should have built this App, right? In short,If we use the command post updates,You must know the name of the corresponding App,Its format is such that: owner/app ,But if you just follow AppCenter in the display to write,It is likely that you will encounter the following error:
1 |
Error: failed to create release upload for xxx.zip |
use --debug Parameters for detailed error:
1 2 3 4 |
... ... / Creating release upload...Response status code: 403 Body: {"message":"Forbidden","statusCode":403,"code":"Forbidden"} |
Obviously,Our operation is rejected,The reason is that - in fact, your user name and App name may not be displayed on the website。
Use the command appcenter apps list View a list of currently owns App,You will find that your App is likely that name:
1 2 3 4 5 |
$ appcenter apps list name/123 name/la4-ge2-shu1-ru4-fa3 name/la4-ge2-shu1-ru4-fa3-X name/pian1-hao3-she4-zhi4 |
...... it is so desperate。
Fortunately,,We can use the command appcenter apps show name/123 To see details of the corresponding App:
1 2 3 4 5 6 7 8 9 10 11 12 |
App Secret: ca2f1f12-b072------8661-c----421e279 Description: Display Name: YourAppName Name: 123 OS: macOS Platform: Objective-C-Swift Release Type: Production Owner ID: -bef--f9-c4c0-4c8f-b787-aab4192a390f Owner Display Name: --- Owner Email: --- Owner Name: name Azure Subscription ID: |
In the third line you can see the name highlighted in this App website,This will be the name here and your own website has been set up in the name of the corresponding。
(Yes,This silly Cock random name can not be changed。)
Upload and update the symbolic link
App to find the corresponding name,Then there is the easy part:
1 |
appcenter distribute release -f xxx.zip --silent -g Collaborators -a name/123 -b 1985 |
And uploaded on a web page is different,Here AppCenter can not help you automatically infer the App Build version number,So you still need to enter it again -b 1985 ,Other than that --silent This update is not required to notify the user, -g Collaborators Specifies the publications to which test group。
After uploading successfully posted results like this:
1 |
Release 2.3.0 Beta (1985) was successfully released to 1 testers in Collaborators |
Next is to build links to upload files for statistical purposes crash:
1 |
appcenter crashes upload-missing-symbols -a name/123 ./symbols |
Direct links to the file that contains the specified directory can,appcenter will automatically traverse the directory to find all of the linked files,Then only need to upload a copy of that,After a successful upload results like this:
1 2 |
6 symbols are needed to symbolicate all crashes 1 of these symbols were found and uploaded |
Such,You will be able to automatically compiled an updated version of it published to the AppCenter。
References
- https://github.com/Microsoft/appcenter-cli
-
How to push IPA and APK file to App Center Distribute from appcenter command line and Jenkins
Original article written by LogStudio:R0uter's Blog » macOS app automated publishing to upload AppCenter
Reproduced Please keep the source and description link:https://www.logcg.com/archives/3290.html