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

Add actions (pre-deploy, post-deploy, pre-devserver, ...) #172

Open
sveneberth opened this issue Sep 4, 2024 · 0 comments
Open

Add actions (pre-deploy, post-deploy, pre-devserver, ...) #172

sveneberth opened this issue Sep 4, 2024 · 0 comments
Labels
feature New feature or request Priority: Low This issue can be considered with enough idle time.
Milestone

Comments

@sveneberth
Copy link
Member

Add a corresponding default command to the viur-base's Pipfile, like https://github.com/viur-framework/viur-core/blob/dd0431bc14c2a2b897f2f54de092cac45b0d5e71/Pipfile#L21. At the end is the project logic.
And the CLI then executes defined commands in the project.json as pre-action hooks.

For example:

{
    "//": "[...]",
    "default": {
        "application_name": "myproject-with-hooks",
        "actions": {
            "pre-deploy": [{
                "command": "pipenv run linter",
                "kind": "exec",
            }, {
                "kind": "viur-cli-build",
            }],
            "pre-devserver": [{
                "command": "pipenv run dependency_check",
                "kind": "exec",
            }, {
                "command": "npm run watch",
                "kind": "exec-background",
            }],
        },
    },
    "//": "[...]",
}

Originally posted by @sveneberth in #158 (review)

@sveneberth sveneberth added feature New feature or request Priority: Low This issue can be considered with enough idle time. labels Sep 4, 2024
@Grashalmbeisser Grashalmbeisser added this to the 3.0.0 milestone Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request Priority: Low This issue can be considered with enough idle time.
Projects
None yet
Development

No branches or pull requests

2 participants