-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] use relative path for template, to avoid git failure #208
base: master
Are you sure you want to change the base?
Conversation
@@ -420,7 +420,7 @@ if (argv.plugman) { | |||
// Create the project using "cordova create" | |||
myDelete(cli_project_dir); | |||
console.log("### Creating project mobilespec..."); | |||
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www"); | |||
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www"); | |
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ." + path.sep + "cordova-mobile-spec" + path.sep + "www"); |
@@ -420,7 +420,7 @@ if (argv.plugman) { | |||
// Create the project using "cordova create" | |||
myDelete(cli_project_dir); | |||
console.log("### Creating project mobilespec..."); | |||
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www"); | |||
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or better yet:
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www"); | |
executeShellCommand(cli + ` create ${projectDirName} org.apache.cordova.mobilespec MobileSpec_Tests --template ${path.join('.', 'cordova-mobile-spec', 'www')}`); |
(not yet tested, should be considered a major change)
@@ -420,7 +420,7 @@ if (argv.plugman) { | |||
// Create the project using "cordova create" | |||
myDelete(cli_project_dir); | |||
console.log("### Creating project mobilespec..."); | |||
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template cordova-mobile-spec" + path.sep + "www"); | |||
executeShellCommand(cli + " create " + projectDirName + " org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec" + path.sep + "www"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not work - ./cordova-mobile-spec/createmobilespec/createmobilespec.js --android
ends with the following non-descriptive output:
### Creating project mobilespec...
$ /Users/brodybits/dev/cordova-test/cordova/cordova-cli/bin/cordova create mobilespec org.apache.cordova.mobilespec MobileSpec_Tests --template ./cordova-mobile-spec/www
Warning: using prerelease version 10.0.0-dev ([email protected])
Creating a new cordova project.
/Users/brodybits/dev/cordova-test/cordova/cordova-mobile-spec/www is not a valid template
Unfortunately I did not see the error message before I raised this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message is from cordova-create. With the latest bunch of breaking changes there, we removed support for plain www
dirs as templates. I did not take a closer look at the code here, but a simple fix could be creating a project with the default template and replacing the www dir afterwards.
Platforms affected
all
Motivation and Context
issue #207
Description
use relative path for template to avoid the git failure reported in issue #207
I suspect that the git failure is due to a change in the way that Cordova CLI works together with npm.
Testing
./cordova-mobile-spec/createmobilespec/createmobilespec.js --android --debug
Checklist
I added automated test coverage as appropriate for this changeCommit is prefixed with(platform)
if this change only applies to one platform (e.g.(android)
)I've updated the documentation if necessary