Skip to content

Commit

Permalink
#1607 Apparently commitish doesnt matter, just need to wait at least …
Browse files Browse the repository at this point in the history
…a second before creating release after push
  • Loading branch information
jlukic committed Feb 24, 2015
1 parent 27771e2 commit 326820f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
9 changes: 5 additions & 4 deletions tasks/admin/components/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ module.exports = function(callback) {
console.info('Pushing files for ' + component);
git.push('origin', 'master', { args: '', cwd: outputDirectory }, function(error) {
console.info('Push completed successfully');
getSHA();
setTimeout(createRelease, 1000);
});
}

// gets SHA of last commit for creating release
// gets SHA of last commit
function getSHA() {
git.exec(versionOptions, function(error, version) {
createRelease(version.trim());
version = version.trim();
console.log(version);
});
}

Expand All @@ -156,7 +157,7 @@ module.exports = function(callback) {
if(version) {
releaseOptions.target_commitish = version;
}
github.releases.editRelease(releaseOptions, function() {
github.releases.createRelease(releaseOptions, function() {
nextRepo();
});
}
Expand Down
12 changes: 5 additions & 7 deletions tasks/admin/distributions/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,26 +134,24 @@ module.exports = function(callback) {

// push changes to remote
function pushFiles() {
console.info('Pushing files for ' + component);
console.info('Pushing files for ' + distribution);
git.push('origin', 'master', { args: '', cwd: outputDirectory }, function(error) {
console.info('Push completed successfully');
getSHA();
setTimeout(createRelease, 1000);
});
}

// gets SHA of last commit for creating release
// gets SHA of last commit
function getSHA() {
git.exec(versionOptions, function(error, version) {
createRelease(version);
version = version.trim();
console.log(version);
});
}

// create release on GitHub.com
function createRelease(version) {
console.log('Tagging release as ', version);
if(version) {
releaseOptions.target_commitish = version;
}
github.releases.createRelease(releaseOptions, function() {
nextRepo();
});
Expand Down

0 comments on commit 326820f

Please sign in to comment.