Cake.HockeyApp allows you to upload an app package to HockeyApp with just two lines of code. In order to use the exposed commands you have to add the following line at top of your build.cake file:
#addin Cake.HockeyApp
Then you can upload your package to HockeyApp:
UploadToHockeyApp("./output/myApp.apk");
That's all!
Don't forget to set your api token from HockeyApp as environment variable:
HOCKEYAPP_API_TOKEN
on your local machine or CI system.
Task("Upload-To-HockeyApp")
.IsDependentOn("Build-APK")
.Does(() => UploadToHockeyApp("./output/myApp.apk"));
Task("Upload-To-HockeyApp")
.IsDependentOn("Build-APK")
.Does(() =>
{
var result = UploadToHockeyApp("./output/myApp.apk"));
// Use result.PublicUrl to inform others where they can download the newly uploaded package.
}
Unfortunately, HockeyApp currently does only support metadata discovering for Android, iOS and macOS packages. Therefore you have to specify a version AND app id your self. This means that you have to create the app once before uploading. Create new App. Creating a new version is automatically done by this addin.
Task("Upload-To-HockeyApp")
.IsDependentOn("Build-AppX")
.Does(() =>
{
UploadToHockeyApp( "./output/myWindowsApp.appx", new HockeyAppUploadSettings
{
AppId = appIdFromHockeyApp,
Version = "1.0.160901.1",
ShortVersion = "1.0-beta2",
Notes = "Uploaded via continuous integration."
});
}
The available parameters for the upload settings are descripted here: http://support.hockeyapp.net/kb/api/api-versions#upload-version
REMEMBER For all request you make you either have to set your API token from HockeyApp as environment variable:
HOCKEYAPP_API_TOKEN
or pass it into the call via
To build this package we are using Cake.
On Windows PowerShell run:
./build
On OSX/Linux run:
./build.sh