Interface to HockeyApp RESTful API for grunt
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-hockeyapp-puck --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-hockeyapp-puck');
Task names have changed to align them better with the API.
hockeyapp_listapps
->puck_app_list
hockeyapp_create
->puck_app_new
- check
puck_app_id
instead ofha_app_id
- check
hockeyapp_addteam
->puck_team_add
hockeyapp_listteams
->puck_team_list
- check
puck_teams
instead ofha_teams
- check
hockeyapp_upload
->puck_version_upload
- instead of
file
useipa
- instead of
This plugin requires an API token to communicate with the RESTful API. See API: Basics and Authentication for more details.
This is not a complete implementation of the API, although the intention is to fill this out as time allows. Currently you can create an app ID, add an app to team and upload a new version of your app.
Also, this is a pain to test as to be able to upload builds you need a developer account and that costs money :$
Get list of apps for your token.
See this link for more details.
grunt.initConfig({
puck_app_list {
your_target: {
options:{
token: null,
}
},
}
});
Type: String
Default value: null
The authentication token.
grunt.config('puck_apps'); // contains list of apps
Create a new app id. If successful, this sets puck_app_id
in the grunt
config to the new app id.
See this link for more details.
grunt.initConfig({
puck_app_new {
your_target: {
options:{
token: null,
title: null,
bundle_identifier: null,
platform: 'iOS', //Android, Mac OS, Windows Phone, Custom
release_type: '0',
custom_release_type: null,
icon:null,
private: 'true'
}
},
}
});
Type: String
Default value: null
The authentication token.
Type: String
Default value: null
The apps name.
Type: String
Default value: null
The bundle identifier on iOS or Mac OS X, the package name on Android, or the namespace on Windows Phone.
Type: String
Default value: iOS
App platform, valid values are iOS
, Android
, Mac OS
, Windows Phone
or Custom
.
Type: String
Default value: 0
Set release type of the app, valid values are 0
for beta, 1
for store, 2
for alpha and 3
for enterprise.
Type: String
Default value:
Set to the custom release type.
Type: String
Default value: null
Optional icon file with content type image/png, image/jpeg, or image image/gif
Type: String
Default value: false
Set to true to enable the private download page.
grunt.initConfig({
puck_app_new {
iOS: {
options:{
token: '1234567890',
title: 'New App',
bundle_identifier: 'com.newbiz.NewApp',
platform: 'iOS',
release_type: '0'
}
},
}
});
grunt.config('puck_app_id'); // contains new app id
Add a team to an app.
See this link for more details.
grunt.initConfig({
puck_team_add {
your_target: {
options:{
token: null,
app_id: null,
team_id: null
}
},
}
});
Type: String
Default value: null
The authentication token.
Type: String
Default value: null
The apps identifier.
Type: String
Default value: null
The team identifier you want to add the app to.
grunt.initConfig({
puck_team_add {
iOS: {
options:{
token: '1234567890',
app_id: '0987654321',
team_id: '762'
}
}
}
});
Upload an app (.ipa, .apk or .zip).
See this link for more details.
NB: use puck_app_new
to get the app_id first before calling this task if you do not have one already.
grunt.initConfig({
puck_version_upload {
your_target: {
options:{
token: null,
app_id: null,
ipa null,
notes: 'Changelog',
notes_type: 1
notify: 2,
status: 2,
tags: '',
teams: null
}
}
}
});
Type: String
Default value: null
The authentication token.
Type: String
Default value: null
The apps identifier.
Type: String
Default value: null
File data of the .ipa for iOS, .app.zip for OS X, or .apk file for Android.
Type: String
Default value: 'Changelog'
Change log in either Markdown or Textile format.
Type: Number
Default value: '1'
Type of change log, 0
for Textile, 1
for Markdown.
Type: Number
Default value: 2
Notify testers, 0
do not notify, 1
notify testers who can install this app or 2
notify all testers.
Type: Number
Default value: 2
Download status of app, 1
do not allow download, 2
allow download.
Type: String
Default value: ''
Restrict download to CSV list of tags.
Type: String
Default value: null
Restrict download to CSV list of team IDs.
grunt.initConfig({
puck_version_upload {
iOS: {
options:{
token: '1234567890',
app_id: '0987654321',
file: <file data>,
notes:'fixed bugs',
teams:'22,33'
}
}
}
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.