add release support

This commit is contained in:
wing328
2016-03-10 23:11:08 +08:00
parent deea3f5c72
commit 4d023e9b92
10 changed files with 244 additions and 4 deletions

View File

@@ -105,6 +105,18 @@ public class Generate implements Runnable {
@Option(name = {"--library"}, title = "library", description = CodegenConstants.LIBRARY_DESC)
private String library;
@Option(name = {"--git-user-id"}, title = "git user id", description = CodegenConstants.GIT_USER_ID)
private String gitUserId;
@Option(name = {"--git-repo-id"}, title = "git repo id", description = CodegenConstants.GIT_REPO_ID)
private String gitRepoId;
@Option(name = {"--release-note"}, title = "release note", description = CodegenConstants.RELEASE_NOTE)
private String releaseNote;
@Option(name = {"--release-version"}, title = "release version", description = CodegenConstants.RELEASE_VERSION)
private String releaseVersion;
@Override
public void run() {
@@ -183,6 +195,22 @@ public class Generate implements Runnable {
configurator.setLibrary(library);
}
if(isNotEmpty(gitUserId)) {
configurator.setGitUserId(gitUserId);
}
if(isNotEmpty(gitRepoId)) {
configurator.setGitRepoId(gitRepoId);
}
if(isNotEmpty(releaseNote)) {
configurator.setReleaseNote(releaseNote);
}
if(isNotEmpty(releaseVersion)) {
configurator.setReleaseVersion(releaseVersion);
}
applySystemPropertiesKvp(systemProperties, configurator);
applyInstantiationTypesKvp(instantiationTypes, configurator);
applyImportMappingsKvp(importMappings, configurator);