Skip to content

Commit 46979da

Browse files
tidy release script & compute tests
1 parent a5da693 commit 46979da

5 files changed

Lines changed: 229 additions & 106 deletions

File tree

lib/compute/autoscaler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@ nodeutil.inherits(Autoscaler, ServiceObject);
168168
Autoscaler.prototype.delete = function(callback) {
169169
callback = callback || util.noop;
170170

171-
var compute = this.zone.compute;
171+
var zone = this.zone;
172172

173173
ServiceObject.prototype.delete.call(this, function(err, resp) {
174174
if (err) {
175175
callback(err, null, resp);
176176
return;
177177
}
178178

179-
var operation = compute.operation(resp.name);
179+
var operation = zone.operation(resp.name);
180180
operation.metadata = resp;
181181

182182
callback(null, operation, resp);
@@ -228,7 +228,7 @@ Autoscaler.prototype.setMetadata = function(metadata, callback) {
228228
return;
229229
}
230230

231-
var operation = zone.compute.operation(resp.name);
231+
var operation = zone.operation(resp.name);
232232
operation.metadata = resp;
233233

234234
callback(null, operation, resp);

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]
4242
# commit to gh-pages branch to apply changes
4343
git config user.name "travis-ci"
4444
git config user.email "[email protected]"
45-
git commit -m "Update docs after merge to master"
45+
git commit -m "Update docs after merge to master [ci skip]"
4646
git status
4747
git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages
4848
else

scripts/release.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,21 @@ openssl aes-256-cbc -K $encrypted_b8aa0887832a_key -iv $encrypted_b8aa0887832a_i
2121
npm run docs
2222
npm run system-test
2323

24-
git config user.name "travis-ci"
25-
git config user.email "[email protected]"
24+
git config --global user.name "travis-ci"
25+
git config --global user.email "[email protected]"
2626

2727
## Attempt to update docs/manifest.json with the new version.
28+
git checkout master
2829
node -e "
2930
file = require('./docs/manifest.json')
3031
if (file.versions.indexOf('${TRAVIS_TAG}') === -1) file.versions.unshift('${TRAVIS_TAG}')
3132
require('fs').writeFileSync('docs/manifest.json', JSON.stringify(file, null, 2) + '\n')
3233
"
34+
# allow "git add" to fail if there aren't new files.
35+
set +e
3336
git add docs/manifest.json
34-
git commit -m "Update docs/manifest.json for ${TRAVIS_TAG}"
37+
set -e
38+
git commit -m "Update docs/manifest.json for ${TRAVIS_TAG} [ci skip]"
3539
git status
3640
if [[ -n "$(git status --porcelain)" ]]; then
3741
git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:master

0 commit comments

Comments
 (0)