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

Issue 1264 bugfix refactor #1276

Closed
wants to merge 10 commits into from

Conversation

archeuclid
Copy link

Hello

Added AshStartScriptPlugin with associated keys, templates, tests. Made it so it does not depend on BashStartScriptPlugin keys and defines. It has to be explicitly enabled with enablePlugins.

The generated scripts do not have quite the same usage as bash/bat scripts. Maybe someone can realign them later and add to docs.

@lightbend-cla-validator
Copy link

Hi @archeuclid,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

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

Thanks @archeuclid for putting so much effort and thought into this PR 🤗

As mentioned in a comment below I really want to understand why we need to add new settings for ash and not just reuse the bash settings. I know that the name is not ideal (shell would probably be better), but adding these settings adds a lot of complexity and maintenance burden.

@@ -69,9 +69,11 @@ import sbt._
* enablePlugins(AshScriptPlugin)
* }}}
*/
@deprecated("Use AshStartScriptPlugin", "1.4.1")
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why we need to do this. As mentioned in #1264 (comment) I'm currently not seeing the benefit as we copy all settings, which are identical, but add the complexity of having to deal with versions of a script where actually only one should exist.

Copy link
Author

Choose a reason for hiding this comment

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

I just wanted to rename so it is ashSTARTSCRIPTplugin not just ashSCRIPTplugin. I agree we can reuse keys, will change that.

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense 👍

@@ -1,105 +1,155 @@
#!/bin/sh
Copy link
Contributor

Choose a reason for hiding this comment

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

I really like the cleaned up version of this scripts. This is by far more readable and predictable

@archeuclid
Copy link
Author

archeuclid commented Nov 20, 2019

Hello Ok

This project need lots of refactor. The scripts must be part of "staging", since it is so close related to JavaAppPackaging. I suggest to write specs for scripts then incorporate them in the "stage".

Also, suggest changing the name from "stage" ("Stager" etc). It is a DevOps term and must be delineated from SoftwareDevs.

Sorry, guys. Lots of stuff to work on hand right now. Use the template .sh in any way you want. I will delete this pull request next time I am here or reject it.

Cheers

@briantopping
Copy link

Is there any way to use what's here?

@muuki88
Copy link
Contributor

muuki88 commented Nov 28, 2019

@briantopping unfortunately not. We have no releases for pull requests. You will need to checkout this pull request and build on your own :( Or you finish this PR and we release :)

@briantopping
Copy link

No worries, I converted the code that depends on this to pass arguments as environment variables. My shell skills are poor at best.

@muuki88
Copy link
Contributor

muuki88 commented Nov 29, 2019

My shell skills are poor at best

You are in good company @briantopping Since kubernetes we have to fight more with YAML than anything else 😂

@gregsymons gregsymons mentioned this pull request Feb 3, 2020
@muuki88 muuki88 closed this Jul 24, 2023
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