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

Prevent dependency loops #7

Open
r0l1 opened this issue Jan 11, 2022 · 0 comments
Open

Prevent dependency loops #7

r0l1 opened this issue Jan 11, 2022 · 0 comments
Labels

Comments

@r0l1
Copy link
Member

r0l1 commented Jan 11, 2022

Sample:

version: 1
project: sample

env:
    VERSION:  1.0.0
    DESTBIN:  sample-${VERSION}
    BUILDDIR: ${ROOT}/build
    BINDIR:   ${ROOT}/bin

options:
    debug: false
    runopts:
        - world
        - mars

interpreter: sh
import:
    - grml.sh

commands:
    clean:
        help: clean the build files
        exec: |
            rm -rf "${BUILDDIR}"

    go:
        help: go helpers
        commands:
            get:
                help: get all go dependencies
                exec: |
                    go get -d ./...
            update:
                help: update all go dependencies
                exec: |
                    go get -u -d ./...
            tidy:
                help: cleanup the go.mod file
                exec: |
                    go mod tidy -v

    build:
        help: build the app
        deps:
            - resources
        exec: |
            go_build
        commands:
            run:
                help: run the app after build
                deps:
                    - build
                    - run

    run:
        help: run the app
        exec: |
            "${BINDIR}/${DESTBIN}" "${runopts}"

    resources:
        help: prepare the resources
        deps:
            - resources.images
            - build
        exec: |
            touch ${BUILDDIR}/resources
        commands:
            images:
                help: prepare image resources
                exec: |
                    touch ${BUILDDIR}/images

    deploy:
        help: deploy the app
        args:
            - host
            - user
        exec: |
            echo "deploying to '${host}' with user '${user}'"
@r0l1 r0l1 added the bug label Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant