fix command line, update git_push.sh

This commit is contained in:
wing328
2016-03-11 14:50:03 +08:00
parent 4d023e9b92
commit 3bebbada98
7 changed files with 16 additions and 53 deletions

View File

@@ -120,22 +120,6 @@ public class DefaultCodegen {
this.setModelNameSuffix((String) additionalProperties.get(CodegenConstants.MODEL_NAME_SUFFIX));
}
if (StringUtils.isEmpty(this.getGitRepoId()))
this.setGitRepoId("YOUR_GIT_REPO_ID");
additionalProperties.put(CodegenConstants.GIT_REPO_ID, this.getGitRepoId());
if (StringUtils.isEmpty(this.getGitUserId()))
this.setGitUserId("YOUR_GIT_USER_ID");
additionalProperties.put(CodegenConstants.GIT_USER_ID, this.getGitUserId());
if (StringUtils.isEmpty(this.getReleaseNote()))
this.setReleaseNote("Minor update");
additionalProperties.put(CodegenConstants.RELEASE_NOTE, this.getReleaseNote());
if (StringUtils.isEmpty(this.getReleaseVersion()))
this.setReleaseVersion("0.1.0");
additionalProperties.put(CodegenConstants.RELEASE_VERSION, this.getReleaseVersion());
}
// override with any special post-processing for all models

View File

@@ -362,6 +362,10 @@ public class CodegenConfigurator {
checkAndSetAdditionalProperty(templateDir, toAbsolutePathStr(templateDir), CodegenConstants.TEMPLATE_DIR);
checkAndSetAdditionalProperty(modelNamePrefix, CodegenConstants.MODEL_NAME_PREFIX);
checkAndSetAdditionalProperty(modelNameSuffix, CodegenConstants.MODEL_NAME_SUFFIX);
checkAndSetAdditionalProperty(gitUserId, CodegenConstants.GIT_USER_ID);
checkAndSetAdditionalProperty(gitRepoId, CodegenConstants.GIT_REPO_ID);
checkAndSetAdditionalProperty(releaseVersion, CodegenConstants.RELEASE_VERSION);
checkAndSetAdditionalProperty(releaseNote, CodegenConstants.RELEASE_NOTE);
handleDynamicProperties(config);

View File

@@ -136,7 +136,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
supportingFiles.add(new SupportingFile("autodoc.script.mustache", "bin", "autodoc"));
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
supportingFiles.add(new SupportingFile("git_push.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
}
@Override