vadimdemedes / trevor

🚦 Your own mini Travis CI to run tests locally
MIT License
2.11k stars 51 forks source link

Fails on node version `lts/*` #61

Closed mightyiam closed 5 years ago

mightyiam commented 7 years ago
➜  cyclejs-web-components git:(master) ✗ trevor                                                                      

 ◌ 7.6.0: downloading base image
 ✖ lts/*: error
Error: ENOENT: no such file or directory, unlink '/home/shahar/src/cyclejs-web-components/.lts/*.dockerfile'
➜  cyclejs-web-components git:(master) ✗
language: node_js
node_js:
  - node
  - lts/*
vadimdemedes commented 7 years ago

Didn't know about that way of specifying versions with nvm. Is there a module that could resolve these kind of versions to semver-like ones?

mightyiam commented 7 years ago

There's bash code for reference, if that helps :nauseated_face: https://github.com/creationix/nvm/blob/master/nvm.sh

It seems like a syntax invented for nvm, because there is no mention of it being based on anything else in the docs: https://github.com/creationix/nvm#long-term-support

Resolving these requires hitting some official Node.js server to get the active LTS versions. Took me a long while, but here is something that should have similar code, at least: https://www.npmjs.com/package/get-node-versions

vadimdemedes commented 7 years ago

Oh, I don't think it's worth so much effort for such a simple thing. I'll leave this open, so that we can at least add a helpful error message.

vadimdemedes commented 7 years ago

Thank you for your effort to help find all this stuff though!

SamVerschueren commented 7 years ago

@vadimdemedes This again makes me wonder how hard/easy it would be to switch to a custom container with NVM preinstalled and just switch dynamically.

mightyiam commented 7 years ago

But my open source packages are all using this syntax!