forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Azure#347 from navalev/feature/merge-upstream-22
Merge from upstream repo 12/17
- Loading branch information
Showing
343 changed files
with
15,857 additions
and
8,924 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,9 +39,10 @@ gulp.task('default', function() { | |
console.log("\tThe version of AutoRest. E.g. 2.0.9, or the location of AutoRest repo, e.g. E:\\repo\\autorest"); | ||
|
||
console.log("--autorest-java"); | ||
console.log("\tPath to an autorest.java generator to pass as a --use argument to AutoRest."); | ||
console.log("\tOption#1: Path to an autorest.java generator to pass as a --use argument to AutoRest."); | ||
console.log("\tOption#2: The version of AutoRest.Java. E.g. 2.0.9. You can also pass latest or preview."); | ||
console.log("\tUsually you'll only need to provide this and not a --autorest argument in order to work on Java code generation."); | ||
console.log("\tSee https://github.com/Azure/autorest/blob/master/docs/developer/autorest-extension.md"); | ||
console.log("\tSee https://github.com/Azure/autorest/blob/master/.attic/developer/autorest-extension.md"); | ||
|
||
console.log("--debug"); | ||
console.log("\tFlag that allows you to attach a debugger to the autorest.java generator."); | ||
|
@@ -62,15 +63,19 @@ var autoRestVersion = 'preview'; // default | |
if (args['autorest'] !== undefined) { | ||
autoRestVersion = args['autorest']; | ||
} | ||
var autoRestJavaVersion = ''; // default | ||
if (args['autorest-java'] !== undefined) { | ||
autoRestJavaVersion = args['autorest-java']; | ||
} | ||
var debug = args['debug']; | ||
var autoRestArgs = args['autorest-args'] || ''; | ||
var autoRestExe; | ||
const mgmtPomFilename = 'pom.mgmt.xml' | ||
|
||
gulp.task('codegen', function(cb) { | ||
if (autoRestVersion.match(/[0-9]+\.[0-9]+\.[0-9]+.*/) || | ||
autoRestVersion == 'preview') { | ||
autoRestExe = 'autorest ---version=' + autoRestVersion; | ||
autoRestVersion == 'preview' || autoRestVersion == 'latest') { | ||
autoRestExe = 'autorest --version=' + autoRestVersion; | ||
handleInput(projects, cb); | ||
} else { | ||
autoRestExe = "node " + path.join(autoRestVersion, "src/autorest-core/dist/app.js"); | ||
|
@@ -107,9 +112,10 @@ var codegen = function(project, cb) { | |
|
||
console.log('Generating "' + project + '" from spec file ' + specRoot + '/' + mappings[project].source); | ||
|
||
const generatorPath = args['autorest-java'] | ||
? `--use=${path.resolve(args['autorest-java'])} ` | ||
: ''; | ||
const generatorPath = autoRestJavaVersion == 'preview' || autoRestJavaVersion == 'latest' | ||
|| autoRestJavaVersion.match(/^[0-9]+\.[0-9]+\.[0-9a-zA-Z]+$/) | ||
? `[email protected]/autorest.java@` + autoRestJavaVersion +` ` | ||
: (autoRestJavaVersion == '' ? '' : `--use=${path.resolve(args['autorest-java'])} `); | ||
|
||
const regenManager = args['regenerate-manager'] ? ' --regenerate-manager=true ' : ''; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.