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

Move scripts to drevops/vortex-tooling package. #1192

Open
AlexSkrypnyk opened this issue Feb 16, 2024 · 2 comments
Open

Move scripts to drevops/vortex-tooling package. #1192

AlexSkrypnyk opened this issue Feb 16, 2024 · 2 comments
Assignees
Labels
State: Confirmed The issue was triaged and confirmed for development Type: Feature Issue is a new feature request
Milestone

Comments

@AlexSkrypnyk
Copy link
Member

AlexSkrypnyk commented Feb 16, 2024

  1. Move scripts/drevops to drevops/vortex-tooling package.
  2. Refactor scripts to support loading from a local file (if it exists) using
b=$(basename $0) && export g="_g_${b/[^a-zA-Z0-9_-]/}" && [ -z "${!g-}" ] && export "${g}"=set && [ -x "./scripts/custom/$(basename "$0")" ] && . "./scripts/custom/$(basename "$0")" "$@" && exit $?
  1. Move bats unit tests.
  2. Move to PHPUnit for workflow tests.
@github-project-automation github-project-automation bot moved this to BACKLOG in Vortex Feb 16, 2024
@AlexSkrypnyk AlexSkrypnyk added this to the 2.0 milestone Feb 16, 2024
@AlexSkrypnyk AlexSkrypnyk changed the title Move scripts to drevops/scaffold-tooling package Consider moving scripts to drevops/scaffold-tooling package Feb 19, 2024
@AlexSkrypnyk
Copy link
Member Author

Community was consulted on this using different channels and there was an equal split of opinions:

  1. Scripts should stay with the project because dealing with "magic" coming from a package is not fun.

VS

  1. Scripts should be in the package because it is easier to manage everything centrally. When local changes required - they can be patched.

So still not clear what the direction should be. May need further discussions.

Going to leave scripts with the project for now.

@AlexSkrypnyk AlexSkrypnyk added the Type: Feature Issue is a new feature request label Feb 28, 2024
@AlexSkrypnyk
Copy link
Member Author

There is a 3rd option: use a package but allow local overrides transparently:
if the custom script with the same name exists in pre-defined custom location (e.g., scripts/custom) - then a custom script will be used, including exit code.

This is the code that works, it's compact, it handles exit code and it has a per-file guard for recursion.

b=$(basename $0) && export g="_g_${b/[^a-zA-Z0-9_-]/}" && [ -z "${!g-}" ] && export "${g}"=set && [ -x "./scripts/custom/$(basename "$0")" ] && . "./scripts/custom/$(basename "$0")" "$@" && exit $?

@AlexSkrypnyk AlexSkrypnyk changed the title Consider moving scripts to drevops/scaffold-tooling package Move scripts to drevops/scaffold-tooling package. Apr 8, 2024
@AlexSkrypnyk AlexSkrypnyk added the State: Confirmed The issue was triaged and confirmed for development label Apr 8, 2024
@AlexSkrypnyk AlexSkrypnyk self-assigned this Apr 8, 2024
@AlexSkrypnyk AlexSkrypnyk moved this from BACKLOG to Next release in Vortex Apr 8, 2024
@AlexSkrypnyk AlexSkrypnyk moved this from Next release to To do for current release in Vortex Apr 16, 2024
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 24.11.0, 24.12.0 Sep 2, 2024
@AlexSkrypnyk AlexSkrypnyk modified the milestones: 24.12.0, 25.1.0 Nov 7, 2024
@AlexSkrypnyk AlexSkrypnyk moved this from BACKLOG to Next release in Vortex Nov 7, 2024
@AlexSkrypnyk AlexSkrypnyk changed the title Move scripts to drevops/scaffold-tooling package. Move scripts to drevops/vortex-tooling package. Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: Confirmed The issue was triaged and confirmed for development Type: Feature Issue is a new feature request
Projects
Status: Next release
Development

No branches or pull requests

1 participant