Giter Site home page Giter Site logo

goke's People

Contributors

dugajean avatar renemanqueros avatar samthom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

goke's Issues

Local (per task) environment variables

Task declarations should accept an env key as well, that essentially allows the user to set up environment variables for a specific task. This variable would override any global ones for this specific task.

Env variables not parsing

When using an env var from global.env and {task}.env in task, they should be substituted with the respective value. Currently it results in an empty string.

For example:

greet-cats:
  run:
    - 'echo "Hello ${CAT}"'
  env:
    CAT: "Kitty"

Outputs Hello . Same goes for this:

global:
  env:
    CAT: "Kitty"

greet-cats:
  run:
    - 'echo "Hello ${CAT}"'

Expected behaviour:

The output should be Hello Kitty.

Implement --init flag

The --init flag would create a goke.yml file if it doesn't exist (in the current dir), with a few sample tasks in it.

Refactor Parser for unit tests

Refactor parser.go, change Parser struct to interface and create mocks using mockery for better unit tests.

Refactor unit tests and add rest of the tests.

Rename $(files) constant to {FILES}

Currently if you want to reference the files: section within a task, you'd use $(files). Rename this placeholder with {FILES} instead.

The dollar sign calls are reserved for shell commands.

Running without options causes panic

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]: main.parseTaskName(...) github.com/dugajean/goke/cmd/cli/main.go:32 main.main() github.com/dugajean/goke/cmd/cli/main.go:25 +0x472

Release Goke as a Chocolatey package

Goke isn't currently very Windows friendly, even though we create a Windows binary. The aim of this issue is to improve the experience of Goke for Windows users.

To do so, this issue suggests the following:

  • Update our GitHub actions so that Goke is deployed to Chocolatey on release
  • Bring back Windows into the push_pull.yml GitHub Action.
  • Ensure CI passes for Windows

Additional unit tests

Write more unit tests for the Executor struct, Parser and Lockfile. Mocks for common file operations are already present under internal/tests/stdlib_wrapper_mock.go.

Pass args after double dash (--) to each command within the task

Sample command:

greet-cats:
  run:
    - 'echo "Hello Frey"'
    - 'echo "Hello Bunny"'

If the command is called as follows

goke greet-cats --force -- foo -bar

The last part (foo -bar), should be passed down to the two echoes within the task, like so

echo "Hello Frey" foo -bar
echo "Hello Bunny" foo -bar

Currently the user is unable to pass arguments down to the commands. This would be useful for single commands that may need variable information passed to them.

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.