Auto-merge for PR #645 via VersionBot

Remove resin-preload build filtering workaround.
This commit is contained in:
resin-io-versionbot[bot] 2017-08-24 12:28:34 +00:00 committed by GitHub
commit cafde01886
4 changed files with 11 additions and 36 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).
## v6.5.3 - 2017-08-24
* Remove resin-preload build filtering workaround. #645 [Alexis Svinartchouk]
## v6.5.2 - 2017-08-22
### Changed

View File

@ -23,7 +23,8 @@ dockerUtils = require('../utils/docker');
LATEST = 'latest';
getApplicationsWithSuccessfulBuilds = function(deviceType) {
var resin;
var preload, resin;
preload = require('resin-preload');
resin = require('resin-sdk-preconfigured');
return resin.pine.get({
resource: 'my_application',
@ -41,25 +42,10 @@ getApplicationsWithSuccessfulBuilds = function(deviceType) {
}
}
},
expand: {
environment_variable: {
$select: ['name', 'value']
},
build: {
$select: ['id', 'commit_hash', 'push_timestamp', 'status'],
$orderby: 'push_timestamp desc'
}
},
expand: preload.applicationExpandOptions,
select: ['id', 'app_name', 'device_type', 'commit'],
orderby: 'app_name asc'
}
}).then(function(applications) {
applications.forEach(function(application) {
return application.build = application.build.filter(function(build) {
return build.status === 'success';
});
});
return applications;
});
};

View File

@ -19,6 +19,7 @@ dockerUtils = require('../utils/docker')
LATEST = 'latest'
getApplicationsWithSuccessfulBuilds = (deviceType) ->
preload = require('resin-preload')
resin = require('resin-sdk-preconfigured')
resin.pine.get
@ -32,25 +33,9 @@ getApplicationsWithSuccessfulBuilds = (deviceType) ->
$expr:
b:
status: 'success'
expand:
environment_variable:
$select: ['name', 'value']
build:
$select: [ 'id', 'commit_hash', 'push_timestamp', 'status' ]
$orderby: 'push_timestamp desc'
# FIXME: The filter is commented because it causes an api error.
# We manually filter out successful builds below.
# We should move that here once this API error is resolved.
#$filter:
# status: 'success'
expand: preload.applicationExpandOptions
select: [ 'id', 'app_name', 'device_type', 'commit' ]
orderby: 'app_name asc'
# manual filtering
.then (applications) ->
applications.forEach (application) ->
application.build = application.build.filter (build) ->
build.status == 'success'
applications
selectApplication = (deviceType) ->
visuals = require('resin-cli-visuals')

View File

@ -1,6 +1,6 @@
{
"name": "resin-cli",
"version": "6.5.2",
"version": "6.5.3",
"description": "The official resin.io CLI tool",
"main": "./build/actions/index.js",
"homepage": "https://github.com/resin-io/resin-cli",
@ -100,4 +100,4 @@
"optionalDependencies": {
"removedrive": "^1.0.0"
}
}
}