Skip to content

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

@sveneberth

Description

@sveneberth

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowThis issue can be considered with enough idle time.featureNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions