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

Skip okbuck if we just want to kill the buck daemon. #425

Merged
merged 1 commit into from
Apr 20, 2017

Conversation

runningcode
Copy link
Contributor

No description provided.

buckw Outdated
@@ -191,6 +191,12 @@ setupBuckRun ( ) {
setupBuckBinary
}

# Do not pass go, do not collect $200 go straight to kill - Skip okbuck if we just want to kill the buck daemon.
if [[ "kill" == "$1" ]];
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move this to a method declaration? We can handle all the cases in '$1' explicitly then

Copy link
Contributor Author

Choose a reason for hiding this comment

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

move it in to setupBuckRun() or its own method?

Copy link
Contributor

Choose a reason for hiding this comment

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

separate method. Something like

handleCommands ( ) {
    if [[ "$1" == "kill" ]]; then # Handle kill command
    elif # handle other commands and so on
    fi
}

@runningcode
Copy link
Contributor Author

Ok, updated to use a function. My bash script foo isn't very good so let me know if there's a better way to do this.

buckw Outdated
if [[ "kill" == $1 ]]; then
SKIP_OKBUCK=true
fi
setupBuckRun
Copy link
Contributor

Choose a reason for hiding this comment

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

setupBuckRun should go just below the call to handleParams

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this below handleParams "$@"

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not need to change this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, I think when the IDE asked if i wanted to use "distribution with sources" I said yes. We don't want the sources?

Copy link
Contributor

Choose a reason for hiding this comment

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

It does not work ever since they generate an API jar for Gradle now. No point bloating up downloads in Travis and ppl working on it. Please change it back

Copy link
Contributor

Choose a reason for hiding this comment

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

It does not work ever since they generate an API jar for Gradle now. No point bloating up downloads in Travis and ppl working on it. Please change it back

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you switch this back to bin as well? The rest looks good

buckw Outdated
setupBuckRun
# Handle parameters and flags
handleParams ( ) {
# Go directly to kill. Do not run okbuck, do not collect $200.
Copy link
Contributor

Choose a reason for hiding this comment

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

👏

Copy link
Contributor

Choose a reason for hiding this comment

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

whats $200?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

That is cool, but please remove it :)

Prefer keeping it clean

buckw Outdated
if [[ "kill" == $1 ]]; then
SKIP_OKBUCK=true
fi
setupBuckRun
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this below handleParams "$@"

buckw Outdated
setupBuckRun
# Handle parameters and flags
handleParams ( ) {
# Go directly to kill. Do not run okbuck, do not collect $200.
Copy link
Contributor

Choose a reason for hiding this comment

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

whats $200?

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you switch this back to bin as well? The rest looks good

@runningcode
Copy link
Contributor Author

Alright, updated to remove $200 and use the binary distribution of the gradle wrapper.

@kageiit kageiit merged commit de4ad2b into uber:master Apr 20, 2017
@seanabraham
Copy link
Contributor

seanabraham commented Apr 24, 2017

@kageiit this is "$200" FYI Do not collect $200

go_to_jail

😛

cwoodwar6 pushed a commit to cwoodwar6/okbuck that referenced this pull request May 10, 2017
* uber/master:
  Use stream instead of parallelStream (uber#437)
  Add empty resource rule if using resource union. (uber#438)
  Publich v0.20.7
  Move okbuck task to its own gradle task class. (uber#436)
  Use try-with-resources (uber#432)
  Update README.md
  Do not allow okbuck to be run without okbuck.wrapper set to true. (uber#433)
  Set descriptions in tasks class instead of when creating them. (uber#431)
  Move cleaning the .okbuck/gen folder to the first step of setupOkbuck. (uber#430)
  Publish v0.20.6
  Add support for downloading 22-25 API robolectric runtime dependencies. (uber#427)
  Skip okbuck if we just want to kill the buck daemon. (uber#425)
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.

4 participants