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

gradle minor improvements, support windows #365

Merged
merged 1 commit into from
Dec 4, 2020
Merged

gradle minor improvements, support windows #365

merged 1 commit into from
Dec 4, 2020

Conversation

scottf
Copy link
Contributor

@scottf scottf commented Dec 4, 2020

No description provided.

def tag = System.getenv("TRAVIS_TAG") != null ? System.getenv("TRAVIS_TAG") : "";
def useSigning = "true".equals(secureEnv) && ("master".equals(branch) || (!"".equals(tag) && tag.equals(branch))) // tag will be the branch on a tag event for travis
def secureEnv = System.getenv("TRAVIS_SECURE_ENV_VARS") != null ? System.getenv("TRAVIS_SECURE_ENV_VARS") : "false"
def branch = System.getenv("TRAVIS_BRANCH") != null ? System.getenv("TRAVIS_BRANCH") : ""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groovy does not require semi-colons

def secureEnv = System.getenv("TRAVIS_SECURE_ENV_VARS") != null ? System.getenv("TRAVIS_SECURE_ENV_VARS") : "false"
def branch = System.getenv("TRAVIS_BRANCH") != null ? System.getenv("TRAVIS_BRANCH") : ""
def tag = System.getenv("TRAVIS_TAG") != null ? System.getenv("TRAVIS_TAG") : ""
def useSigning = "true" == secureEnv && ("master" == branch || ("" != tag && tag == branch)) // tag will be the branch on a tag event for travis
Copy link
Contributor Author

@scottf scottf Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groovy treats == like java equals(), not like in java as object equivalency

@@ -134,6 +135,7 @@ javadoc {
excludes = ['io/nats/client/impl', 'io/nats/examples']
classpath = sourceSets.main.runtimeClasspath
doLast {
if (!OperatingSystem.current().isWindows()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this allows the build to work on windows while not affecting any other operating system

Copy link
Member

@ColinSullivan1 ColinSullivan1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks!

@ColinSullivan1 ColinSullivan1 merged commit 5230d23 into nats-io:master Dec 4, 2020
@scottf scottf deleted the gradle-windows branch December 20, 2020 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants