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

before and after life cycle hooks per each command #196

Open
akhilbojedla opened this issue May 17, 2020 · 2 comments
Open

before and after life cycle hooks per each command #196

akhilbojedla opened this issue May 17, 2020 · 2 comments
Labels
good first issue Good for first time contributors new_feature New features
Milestone

Comments

@akhilbojedla
Copy link
Contributor

Description

Currently, we have before and after life cycle hooks that get executed before and after all the specified commands are executed. However, In some scenarios, it might be the case that we also need more granular life cycle hooks within the scope of a single command.

project: Sample Web App
before: export VARNAME="my value"
after: unset VARNAME
commands:
   - build: 
        before: echo "before"
        command: npm run build
        after: echo "after"

Acceptance Criteria

  • User should be able to define before and after for each individual command
  • Should be able to disable global before and after for an individual command
@gopinath-langote
Copy link
Owner

gopinath-langote commented May 20, 2020

@akhilbojedla Good feature to have.

Current before after runs as before all and after all is you run multiple commands at a time.

Having per command would definitely help.

It will change the contract for the file. Need to think if we can accommodate it with existing structure.

@akhilbojedla
Copy link
Contributor Author

akhilbojedla commented May 20, 2020

@gopinath-langote I think it should be possible. If we can update our config yml parsing logic. We can make it to either accept a string (which would then be executed as command) or nested properties with lifecycle definitions.

@gopinath-langote gopinath-langote added this to To do in Feature Ideas / Bug tracker via automation Aug 16, 2020
@gopinath-langote gopinath-langote added new_feature New features good first issue Good for first time contributors labels Aug 16, 2020
@gopinath-langote gopinath-langote added this to the v1.6.0 milestone Aug 16, 2020
@gopinath-langote gopinath-langote pinned this issue Aug 16, 2020
@gopinath-langote gopinath-langote modified the milestones: v1.6.0, v1.7.0 Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for first time contributors new_feature New features
Projects
Development

No branches or pull requests

2 participants