macOS app automated publishing to upload AppCenter

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:

use --debug Parameters for detailed error:

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:

...... it is so desperate。

Fortunately,,We can use the command appcenter apps show name/123 To see details of the corresponding App:

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:

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 --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:

Next is to build links to upload files for statistical purposes crash:

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:

Such,You will be able to automatically compiled an updated version of it published to the AppCenter。

References

 

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

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a Reply

Your email address will not be published. Required fields are marked *