Skip to content
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

Security plugin qualifier support default to alpha1 #1738

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,19 @@ repositories {
}

ext {
default_opensearch_version = property("opensearch-core.version") + "-SNAPSHOT"
opensearch_version = System.getProperty("opensearch.version", default_opensearch_version)
buildVersionQualifier = System.getProperty("build.version_qualifier")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
opensearch_version = System.getProperty("opensearch.version", "2.0.0-alpha1-SNAPSHOT")
buildVersionQualifier = System.getProperty("build.version_qualifier", "alpha1")
// 2.0.0-alpha1-SNAPSHOT -> 2.0.0.0-alpha1-SNAPSHOT
version_tokens = opensearch_version.tokenize('-')
opensearch_build = version_tokens[0] + '.0'
if (buildVersionQualifier) {
opensearch_build += "-${buildVersionQualifier}"
opensearch_build_nosnapshot = opensearch_build
}
if (isSnapshot) {
opensearch_build += "-SNAPSHOT"
}
}

configurations.all {
Expand Down Expand Up @@ -124,19 +134,8 @@ dependencies {
compileOnly "org.opensearch:opensearch:${opensearch_version}"
}

ext {
securityPluginVersion = property('security-plugin.version')
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

group = 'org.opensearch'
version = securityPluginVersion
if (buildVersionQualifier) {
version += "-${buildVersionQualifier}"
}
if (isSnapshot) {
version += "-SNAPSHOT"
}
version = opensearch_build

description = 'OpenSearch Security'

Expand Down Expand Up @@ -326,16 +325,13 @@ task bundleSecurityAdminStandaloneTarGz(dependsOn: jar, type: Tar) {
}

task createPluginDescriptor() {
if (opensearch_version.contains("-SNAPSHOT")) {
opensearch_version=opensearch_version.substring(0, opensearch_version.length() - 9)
}
List<String> descriptorProperties = [
"description=Provide access control related features for OpenSearch",
"version=${version}",
"name=opensearch-security",
"classname=org.opensearch.security.OpenSearchSecurityPlugin",
"java.version=${java.targetCompatibility}",
"opensearch.version=${opensearch_version}",
"opensearch.version=${opensearch_build_nosnapshot}",
]

new File("plugin-descriptor.properties").text = descriptorProperties.join ("\n")
Expand Down
4 changes: 0 additions & 4 deletions gradle.properties

This file was deleted.