Skip to content

Commit

Permalink
Delete upload-release command. It's no longer used.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrieve committed Apr 24, 2014
1 parent f31cdef commit 5593a15
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions coho
Expand Up @@ -797,58 +797,6 @@ function createReleaseCommand(argv) {
process.exit(0);
}

function apacheUpload(){
var opt = registerRepoFlag(optimist)
opt = opt
.options('new-version', {
desc: 'The version to release. E.g. 3.0.0',
demand: true
})
.options('prev-version', {
desc: 'The previous release version (used to remove old version from download page)',
demand: false
});

opt = registerHelpFlag(opt);
var argv = opt
.usage('Uploads the release to the apache servers and optionally removes previous release files.\n' +
'This involves:\n' +
' Checking out Apache Cordova release repository if it does not already exist.\n' +
' Updating the repositoryvia svn update\n' +
' Optionally removing old release artifacts\n' +
' Copying in new release artifacts\n' +
' Svn committing new release artifacts to the apache repo\n' +
'\n' +
'Usage: $0 upload-release --new-version 3.0.0 [--prev-version 2.9.0]')
.argv;

if (argv.h) {
optimist.showHelp();
process.exit(1);
}

if (shjs.test('-d','./apachecordova')){
print('apachecordova directory exists');
execHelper("cd apachecordova && svn update");

} else {
//grab apachecordova repo off apache svn servers
execHelper("svn checkout https://dist.apache.org/repos/dist/release/cordova apachecordova")
}

if (argv['prev-version'] && shjs.test('-d','./apachecordova/cordova-'+argv['prev-version']+'-src.zip')){
//remove old version
print('removing previous release from apache servers')
execHelper("cd apachecordova && svn delete cordova-"+argv['prev-version']+"-src.*");
}

print('copy over and commit new release files')
execHelper("cp -r releases/cordova-"+argv['new-version']+"/cordova-"+argv['new-version']+"-src* apachecordova/");
execHelper("cd apachecordova && svn add cordova-"+argv['new-version']+"-src*");
print("svn commit -m 'updated to "+argv['new-version']+"'")
execHelper("cd apachecordova && svn commit -m 'updated to "+opt.argv['new-version']+"'");
}

function computeReposFromFlag(flagValue) {
var values = Array.isArray(flagValue) ? flagValue : [flagValue];
var ret = [];
Expand Down Expand Up @@ -2073,10 +2021,6 @@ function main() {
name: 'print-tags',
desc: 'Prints out tags & hashes for the given repos. Used in VOTE emails.',
entryPoint: printTagsCommand
}, {
name: 'upload-release',
desc: 'Uploads a signed .zip to Cordova\'s webserver.',
entryPoint: apacheUpload
}, {
name: 'last-week',
desc: 'Prints out git logs of things that happened last week.',
Expand Down

0 comments on commit 5593a15

Please sign in to comment.