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 to the target an option for success and failure #18

Open
xmnlab opened this issue Feb 16, 2023 · 1 comment
Open

Add to the target an option for success and failure #18

xmnlab opened this issue Feb 16, 2023 · 1 comment

Comments

@xmnlab
Copy link
Member

xmnlab commented Feb 16, 2023

It would be nice if the target has an option for success or failure .. so we can have alternatives commands for both flows.

@xmnlab
Copy link
Member Author

xmnlab commented Feb 24, 2023

example:

version: 1.0.0
groups:
  - name: default
    env-file: .env
    targets:
      clean:
        help: Use this target to clean up temporary files
        args:
          all:
            type: bool
            action: store_true
            help: Remove all files that are tracked by git
        run: |
          echo "remove file X"
        success: echo "ok"
        failure: echo "false"
      build:
        help: Build the program
        args:
          clean:
            type: bool
            action: store_true
            help: if not set, the clean dependency will not be triggered.
        dependencies:
          - target: clean
            if: \${\{ args.clean == true \}\}
        run: |
          echo "build file x"
          echo "build file y"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant