You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by stevengill <gi...@git.apache.org> on 2014/10/30 06:04:27 UTC

[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

GitHub user stevengill opened a pull request:

    https://github.com/apache/cordova-coho/pull/58

    Cb-7904: Pull request for nightlys

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/stevengill/cordova-coho cb-7904

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-coho/pull/58.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #58
    
----
commit 515a3835ab0db90865eadd5302a28437912e4933
Author: Steve Gill <st...@gmail.com>
Date:   2014-10-24T00:51:16Z

    added initial work to build nightly, updating platforms.js file in cordova-lib

commit c50dc81d83968184b962cbc7df37ab82667d9f5c
Author: Steve Gill <st...@gmail.com>
Date:   2014-10-30T05:02:20Z

    CB-7904 Added nightly command to build nightly releases

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19605765
  
    --- Diff: src/nightly.js ---
    @@ -0,0 +1,148 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var executil = require('./executil');
    +var optimist = require('optimist');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');
    +var repoupdate = require('./repo-update');
    +var retrieveSha = require('./retrieve-sha');
    +var npmpublish = require('./npm-publish');
    +var versionutil = require('./versionutil');
    +var gitutil = require('./gitutil');
    +var fs = require('fs');
    +var path = require('path');
    +
    +module.exports = function*(argv) {
    +    var repos = flagutil.computeReposFromFlag('nightly');
    +    var cli = repoutil.getRepoById('cli');
    +    var cordovaLib = repoutil.getRepoById('lib');
    +    var opt = flagutil.registerHelpFlag(optimist);
    +
    +    argv = opt
    +        .usage('Publish CLI & LIB to NPM under nightly tag. \n' +
    +               'Cordova platform add uses latest commits to the platforms. \n' +
    +               'Usage: $0 nightly'
    +        )
    +        .options('pretend', {
    +            desc: 'Don\'t actually publish to npm, just print what would be run.',
    +            type:'boolean'
    +        })
    +        .argv;    
    +
    +    if(argv.h) {
    +        optimist.showHelp();
    +        process.exit(1);
    +    }
    +
    +    //Update Repos
    +    yield repoupdate.updateRepos(repos);
    +    
    +    //Remove any local changes for cli & lib
    +    yield repoutil.forEachRepo([cordovaLib, cli], function*() {
    +        gitutil.resetFromOrigin();
    --- End diff --
    
    need to yield this I think.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19690856
  
    --- Diff: src/npm-publish.js ---
    @@ -0,0 +1,77 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var optimist = require('optimist');
    +var apputil = require('./apputil');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');   
    +var executil = require('./executil');
    +var print = apputil.print;
    +
    +exports.publishTag = function*(argv) {
    +    var opt = flagutil.registerHelpFlag(optimist);
    +   
    +    //argv was passed through another function, set defaults to appease demand.
    +    if(argv) {
    +        opt = opt
    +            .options('tag', {
    +                default:argv.tag
    --- End diff --
    
    Since publishTag is called from main.js, you shouldn't do anything funny with the argv.
    
    instead though, maybe make a helper function that both publishTag and nightly call into that have the args already parsed out?
    
    e.g. 
    publishTagCommand(argv)
    publishTag(tag, repos, pretend)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19606268
  
    --- Diff: src/repoutil.js ---
    @@ -449,14 +450,23 @@ exports.forEachRepo = function*(repos, func) {
             var newPath = isInForEachRepoFunction ? path.join('..', repo.repoName) : repo.repoName;
     
             isInForEachRepoFunction = true;
    +        
    +        if(repo.id === 'lib'){
    --- End diff --
    
    nit: Can you just add a comment here saying that cordova-lib lives inside of cordova-lib


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19605982
  
    --- Diff: src/nightly.js ---
    @@ -0,0 +1,148 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var executil = require('./executil');
    +var optimist = require('optimist');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');
    +var repoupdate = require('./repo-update');
    +var retrieveSha = require('./retrieve-sha');
    +var npmpublish = require('./npm-publish');
    +var versionutil = require('./versionutil');
    +var gitutil = require('./gitutil');
    +var fs = require('fs');
    +var path = require('path');
    +
    +module.exports = function*(argv) {
    +    var repos = flagutil.computeReposFromFlag('nightly');
    +    var cli = repoutil.getRepoById('cli');
    +    var cordovaLib = repoutil.getRepoById('lib');
    +    var opt = flagutil.registerHelpFlag(optimist);
    +
    +    argv = opt
    +        .usage('Publish CLI & LIB to NPM under nightly tag. \n' +
    +               'Cordova platform add uses latest commits to the platforms. \n' +
    +               'Usage: $0 nightly'
    +        )
    +        .options('pretend', {
    +            desc: 'Don\'t actually publish to npm, just print what would be run.',
    +            type:'boolean'
    +        })
    +        .argv;    
    +
    +    if(argv.h) {
    +        optimist.showHelp();
    +        process.exit(1);
    +    }
    +
    +    //Update Repos
    +    yield repoupdate.updateRepos(repos);
    +    
    +    //Remove any local changes for cli & lib
    +    yield repoutil.forEachRepo([cordovaLib, cli], function*() {
    +        gitutil.resetFromOrigin();
    +    });
    +    
    +    //get SHAS from platforms
    +    var SHAJSON = yield retrieveSha(repos);
    +    
    +    //save SHAJSON in cordova-cli repo
    +    yield repoutil.forEachRepo([cli], function*() {
    +        //need to get the path to cordova-cli using executil
    +        var cordovaclidir = yield executil.execHelper(executil.ARGS('pwd'), true, true);
    +        fs.writeFile((path.join(cordovaclidir, 'shas.json')), JSON.stringify(SHAJSON, null, 4), 'utf8', function(err) {
    +            if (err) return console.log (err);
    +        });
    +
    +    });
    +
    +    //Update platform references at cordova-lib/src/cordova/platformsConfig.json
    +    var cordovalibdir;
    +    yield repoutil.forEachRepo([cordovaLib], function*() {
    +        //need to get the path to cordova-lib using executil
    +        cordovalibdir = yield executil.execHelper(executil.ARGS('pwd'), true, true);
    +    });
    +
    +    yield updatePlatformsFile(path.join(cordovalibdir, 'src/cordova/platformsConfig.json'), SHAJSON);
    +
    +
    +    var currentDate = new Date();
    +    var nightlyVersion = '-nightly.' + currentDate.getFullYear() + '.' +
    +                        currentDate.getMonth() + '.' + currentDate.getDate();
    +    var cordovaLibVersion;
    +    //update package.json version for cli + lib, update lib reference for cli
    +    yield repoutil.forEachRepo([cordovaLib, cli], function*(repo) {
    +        var dir = yield executil.execHelper(executil.ARGS('pwd'), true, true);
    +        var packageJSON = require(dir+'/package.json');
    +        packageJSON.version = versionutil.removeDev(packageJSON.version) + nightlyVersion;
    +
    +        if(repo.id === 'lib'){
    +            cordovaLibVersion = packageJSON.version;
    +        } else {
    +            packageJSON.dependencies['cordova-lib'] = cordovaLibVersion;
    +        }
    +
    +        fs.writeFile(dir+'/package.json', JSON.stringify(packageJSON, null, 4), 'utf8', function(err) {
    --- End diff --
    
    writeFileSync


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19605710
  
    --- Diff: src/gitutil.js ---
    @@ -90,4 +90,6 @@ exports.hashForRef = function(ref) {
         return executil.execHelper(executil.ARGS('git rev-parse', ref), true, true);
     };
     
    -
    +exports.resetFromOrigin = function() {
    +    return executil.execHelper(executil.ARGS('git reset --hard origin/master'), false, true);
    --- End diff --
    
    may also want to do a "git clean -d -f"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19605826
  
    --- Diff: src/nightly.js ---
    @@ -0,0 +1,148 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var executil = require('./executil');
    +var optimist = require('optimist');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');
    +var repoupdate = require('./repo-update');
    +var retrieveSha = require('./retrieve-sha');
    +var npmpublish = require('./npm-publish');
    +var versionutil = require('./versionutil');
    +var gitutil = require('./gitutil');
    +var fs = require('fs');
    +var path = require('path');
    +
    +module.exports = function*(argv) {
    +    var repos = flagutil.computeReposFromFlag('nightly');
    +    var cli = repoutil.getRepoById('cli');
    +    var cordovaLib = repoutil.getRepoById('lib');
    +    var opt = flagutil.registerHelpFlag(optimist);
    +
    +    argv = opt
    +        .usage('Publish CLI & LIB to NPM under nightly tag. \n' +
    +               'Cordova platform add uses latest commits to the platforms. \n' +
    +               'Usage: $0 nightly'
    +        )
    +        .options('pretend', {
    +            desc: 'Don\'t actually publish to npm, just print what would be run.',
    +            type:'boolean'
    +        })
    +        .argv;    
    +
    +    if(argv.h) {
    +        optimist.showHelp();
    +        process.exit(1);
    +    }
    +
    +    //Update Repos
    +    yield repoupdate.updateRepos(repos);
    +    
    +    //Remove any local changes for cli & lib
    +    yield repoutil.forEachRepo([cordovaLib, cli], function*() {
    +        gitutil.resetFromOrigin();
    +    });
    +    
    +    //get SHAS from platforms
    +    var SHAJSON = yield retrieveSha(repos);
    +    
    +    //save SHAJSON in cordova-cli repo
    +    yield repoutil.forEachRepo([cli], function*() {
    +        //need to get the path to cordova-cli using executil
    +        var cordovaclidir = yield executil.execHelper(executil.ARGS('pwd'), true, true);
    --- End diff --
    
    why not just use process.cwd()?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19606137
  
    --- Diff: src/npm-publish.js ---
    @@ -0,0 +1,77 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var optimist = require('optimist');
    +var apputil = require('./apputil');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');   
    +var executil = require('./executil');
    +var print = apputil.print;
    +
    +exports.publishTag = function*(argv) {
    +    var opt = flagutil.registerHelpFlag(optimist);
    +   
    +    //argv was passed through another function, set defaults to appease demand.
    +    if(argv) {
    +        opt = opt
    +            .options('tag', {
    +                default:argv.tag
    --- End diff --
    
    This is not the same argv as all other commands take (an array). Why not just use an array when calling from nightly?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19605898
  
    --- Diff: src/nightly.js ---
    @@ -0,0 +1,148 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var executil = require('./executil');
    +var optimist = require('optimist');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');
    +var repoupdate = require('./repo-update');
    +var retrieveSha = require('./retrieve-sha');
    +var npmpublish = require('./npm-publish');
    +var versionutil = require('./versionutil');
    +var gitutil = require('./gitutil');
    +var fs = require('fs');
    +var path = require('path');
    +
    +module.exports = function*(argv) {
    +    var repos = flagutil.computeReposFromFlag('nightly');
    +    var cli = repoutil.getRepoById('cli');
    +    var cordovaLib = repoutil.getRepoById('lib');
    +    var opt = flagutil.registerHelpFlag(optimist);
    +
    +    argv = opt
    +        .usage('Publish CLI & LIB to NPM under nightly tag. \n' +
    +               'Cordova platform add uses latest commits to the platforms. \n' +
    +               'Usage: $0 nightly'
    +        )
    +        .options('pretend', {
    +            desc: 'Don\'t actually publish to npm, just print what would be run.',
    +            type:'boolean'
    +        })
    +        .argv;    
    +
    +    if(argv.h) {
    +        optimist.showHelp();
    +        process.exit(1);
    +    }
    +
    +    //Update Repos
    +    yield repoupdate.updateRepos(repos);
    +    
    +    //Remove any local changes for cli & lib
    +    yield repoutil.forEachRepo([cordovaLib, cli], function*() {
    +        gitutil.resetFromOrigin();
    +    });
    +    
    +    //get SHAS from platforms
    +    var SHAJSON = yield retrieveSha(repos);
    +    
    +    //save SHAJSON in cordova-cli repo
    +    yield repoutil.forEachRepo([cli], function*() {
    +        //need to get the path to cordova-cli using executil
    +        var cordovaclidir = yield executil.execHelper(executil.ARGS('pwd'), true, true);
    +        fs.writeFile((path.join(cordovaclidir, 'shas.json')), JSON.stringify(SHAJSON, null, 4), 'utf8', function(err) {
    --- End diff --
    
    you should use writeFileSync if you depend on this file anywhere below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on the pull request:

    https://github.com/apache/cordova-coho/pull/58#issuecomment-61352204
  
    Merged in


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19642142
  
    --- Diff: src/repoutil.js ---
    @@ -449,14 +450,23 @@ exports.forEachRepo = function*(repos, func) {
             var newPath = isInForEachRepoFunction ? path.join('..', repo.repoName) : repo.repoName;
     
             isInForEachRepoFunction = true;
    +        
    +        if(repo.id === 'lib'){
    +            newPath = newPath + '/cordova-lib'
    +        } 
             shelljs.cd(newPath);
    +
             if (shelljs.error()) {
                 apputil.fatal('Repo directory does not exist: ' + repo.repoName + '. First run coho repo-clone.');
             }
             yield func(repo);
    +        
    +        if(repo.id === 'lib'){
    +            origPath = origPath + '/..';
    --- End diff --
    
    I'm confused about how I should check against isInForEachRepoFunction. It is set to true and the top and false at the bottom. What should the check do?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19641787
  
    --- Diff: src/npm-publish.js ---
    @@ -0,0 +1,77 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var optimist = require('optimist');
    +var apputil = require('./apputil');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');   
    +var executil = require('./executil');
    +var print = apputil.print;
    +
    +exports.publishTag = function*(argv) {
    +    var opt = flagutil.registerHelpFlag(optimist);
    +   
    +    //argv was passed through another function, set defaults to appease demand.
    +    if(argv) {
    +        opt = opt
    +            .options('tag', {
    +                default:argv.tag
    --- End diff --
    
    Would it be kosher to use an object instead?
    
    {tag:'nightly', r:['cli', 'lib'], pretend:true}
    
    That is all of the info I want to send from nightly


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by stevengill <gi...@git.apache.org>.
Github user stevengill closed the pull request at:

    https://github.com/apache/cordova-coho/pull/58


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19606358
  
    --- Diff: src/repoutil.js ---
    @@ -449,14 +450,23 @@ exports.forEachRepo = function*(repos, func) {
             var newPath = isInForEachRepoFunction ? path.join('..', repo.repoName) : repo.repoName;
     
             isInForEachRepoFunction = true;
    +        
    +        if(repo.id === 'lib'){
    +            newPath = newPath + '/cordova-lib'
    +        } 
             shelljs.cd(newPath);
    +
             if (shelljs.error()) {
                 apputil.fatal('Repo directory does not exist: ' + repo.repoName + '. First run coho repo-clone.');
             }
             yield func(repo);
    +        
    +        if(repo.id === 'lib'){
    +            origPath = origPath + '/..';
    --- End diff --
    
    Would make more sense to put this where you modify newPath. You should also be checking against isInForEachRepoFunction


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-coho pull request: Cb-7904: Pull request for nightlys

Posted by stevengill <gi...@git.apache.org>.
Github user stevengill commented on a diff in the pull request:

    https://github.com/apache/cordova-coho/pull/58#discussion_r19641256
  
    --- Diff: src/nightly.js ---
    @@ -0,0 +1,148 @@
    +/*
    +Licensed to the Apache Software Foundation (ASF) under one
    +or more contributor license agreements.  See the NOTICE file
    +distributed with this work for additional information
    +regarding copyright ownership.  The ASF licenses this file
    +to you under the Apache License, Version 2.0 (the
    +"License"); you may not use this file except in compliance
    +with the License.  You may obtain a copy of the License at
    +
    +http://www.apache.org/licenses/LICENSE-2.0
    +
    +Unless required by applicable law or agreed to in writing,
    +software distributed under the License is distributed on an
    +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +KIND, either express or implied.  See the License for the
    +specific language governing permissions and limitations
    +under the License.
    +*/
    +
    +var executil = require('./executil');
    +var optimist = require('optimist');
    +var flagutil = require('./flagutil');
    +var repoutil = require('./repoutil');
    +var repoupdate = require('./repo-update');
    +var retrieveSha = require('./retrieve-sha');
    +var npmpublish = require('./npm-publish');
    +var versionutil = require('./versionutil');
    +var gitutil = require('./gitutil');
    +var fs = require('fs');
    +var path = require('path');
    +
    +module.exports = function*(argv) {
    +    var repos = flagutil.computeReposFromFlag('nightly');
    +    var cli = repoutil.getRepoById('cli');
    +    var cordovaLib = repoutil.getRepoById('lib');
    +    var opt = flagutil.registerHelpFlag(optimist);
    +
    +    argv = opt
    +        .usage('Publish CLI & LIB to NPM under nightly tag. \n' +
    +               'Cordova platform add uses latest commits to the platforms. \n' +
    +               'Usage: $0 nightly'
    +        )
    +        .options('pretend', {
    +            desc: 'Don\'t actually publish to npm, just print what would be run.',
    +            type:'boolean'
    +        })
    +        .argv;    
    +
    +    if(argv.h) {
    +        optimist.showHelp();
    +        process.exit(1);
    +    }
    +
    +    //Update Repos
    +    yield repoupdate.updateRepos(repos);
    +    
    +    //Remove any local changes for cli & lib
    +    yield repoutil.forEachRepo([cordovaLib, cli], function*() {
    +        gitutil.resetFromOrigin();
    +    });
    +    
    +    //get SHAS from platforms
    +    var SHAJSON = yield retrieveSha(repos);
    +    
    +    //save SHAJSON in cordova-cli repo
    +    yield repoutil.forEachRepo([cli], function*() {
    +        //need to get the path to cordova-cli using executil
    +        var cordovaclidir = yield executil.execHelper(executil.ARGS('pwd'), true, true);
    --- End diff --
    
    Solid tip! Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org