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

Interactive config should employ better algorithm to detect installation command in CI config files #525

Closed
honzajavorek opened this issue Jun 14, 2016 · 2 comments · Fixed by #1102
Labels
Epic: configuration Command line options, dredd init, dredd.yml

Comments

@honzajavorek
Copy link
Contributor

Interactive config currently just checks whether the npm install -g dredd isn't already present in the TravisCI or Circle CI configuration file. It should be more benevolent in checking what's present (npm install dredd, npm install -g dredd@...) and it should be more strict in what will be passed to the output (npm install -g dredd@version if command uses pinned version or npm install -g dredd@stable otherwise).

@honzajavorek honzajavorek added the Epic: configuration Command line options, dredd init, dredd.yml label Aug 6, 2018
@honzajavorek
Copy link
Contributor Author

  • if package.json is present and dredd is not there, offer adding it
    • yes?
      • run npm install dredd --no-optional --save-dev
      • if running dredd is not present in the CI config, add npx dredd to the CI config
      • ensure the CI config contains something like npm install
  • else
    • ensure dredd in globally installed in the CI config npm install dredd@version --no-optional --global
    • if running dredd is not present in the CI config, add dredd to the CI config

Indepotent!

@honzajavorek
Copy link
Contributor Author

Okay, I gave it a bit of focus and it's way too complicated. Programmatic editing of CI configurations is a difficult task full of assumptions. I'll go with an easier solution and let's see how that works, anyone is welcome to improve my work and to catch corner cases, afterwards.

honzajavorek added a commit that referenced this issue Aug 9, 2018
@honzajavorek honzajavorek mentioned this issue Aug 10, 2018
3 tasks
honzajavorek added a commit that referenced this issue Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic: configuration Command line options, dredd init, dredd.yml
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant