Giter Club home page Giter Club logo

Comments (1)

zuzuleinen avatar zuzuleinen commented on May 18, 2024

Testing basic scenario

Using server example

version: 0
variables:
  VAR_ONE: andrei
build:
  generate-api:
    input: openapi.yaml
    cmd: |-
      oapi-codegen -package generated -generate types -o server/rest-api/generated/types.gen.go openapi.yaml
      oapi-codegen -package generated -generate server -o server/rest-api/generated/server.gen.go openapi.yaml
    target: |-
      server/rest-api/generated/types.gen.go
      server/rest-api/generated/server.gen.go
  build:
    input: |-
      ./server
      go.mod
      go.sum
      main.go
    cmd: go build -o ./build/server main.go
    dependson:
      - generate-api
      - show
    target: /build/server
  show:
    cmd: env
run:
  server:
    type: binary
    path: ./build/server
    dependson:
      - build
      - database
  database:
    type: compose
    path: docker-compose.yml
use-nix: true
dependencies:
  - oapi-codegen
  - go_1_18

Running bob build will fail with go: module cache not found: neither GOMODCACHE nor GOPATH is set.

Running bob build --env=GOPATH will fail with build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined.

Running bob build --env=GOPATH --env=HOME will run build successfully.

Testing priority when same value is set on bobfile and cli

Running bob build show --no-cache will display:

show            running task...
show              PATH=/nix/store/j9rc786ylq8cid4zgcn6idknilkbd4ax-bash-5.1-p16/bin:/nix/store/l2xyarvzahpz3fysr9hqbvcsgv5gnrnk-coreutils-9.1/bin:/nix/store/l62i4fn54qry9xamnj209wfizpw2bng5-gnused-4.8/bin:/nix/store/ip1zdc23sqyq15957lbjrxj31m5xh72c-findutils-4.9.0/bin:/nix/store/hcx4wnpn7gf6pccmzv4s547rv5w6pj0f-oapi-codegen-1.9.1/bin:/nix/store/i8zpdbzds1975lf0k1kc7awzsjn7rlp5-go-1.18.3/bin
show              VAR_ONE=andrei
show            ...done

Running bob build show --no-cache --env VAR_ONE=matthias will display:

show            running task...
show              PATH=/nix/store/j9rc786ylq8cid4zgcn6idknilkbd4ax-bash-5.1-p16/bin:/nix/store/l2xyarvzahpz3fysr9hqbvcsgv5gnrnk-coreutils-9.1/bin:/nix/store/l62i4fn54qry9xamnj209wfizpw2bng5-gnused-4.8/bin:/nix/store/ip1zdc23sqyq15957lbjrxj31m5xh72c-findutils-4.9.0/bin:/nix/store/hcx4wnpn7gf6pccmzv4s547rv5w6pj0f-oapi-codegen-1.9.1/bin:/nix/store/i8zpdbzds1975lf0k1kc7awzsjn7rlp5-go-1.18.3/bin
show              VAR_ONE=matthias
show            ...done

from bob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.