CyCoreSystems / docker-meteor

Dockerfile and script for running Meteor on Docker
MIT License
120 stars 73 forks source link

Version detection not working in 1.4.3-beta.2 #45

Closed jakobrosenberg closed 7 years ago

jakobrosenberg commented 7 years ago

No problems in 1.4.2.3, but after updating to the latest beta I'm getting Application's Meteor version is less than 1.3.1; please use ulexus/meteor:legacy.

Downgrading with meteor update --release 1.4.2.3 fixes the problem.

I'm using prebundled builds. meteor build --directory .build/output --architecture os.linux.x86_64 --server-only

Could the dash cause a delimiter problem in version detection?

Ulexus commented 7 years ago

I suspect the semver parsing is failing with that beta version syntax. I'll see if there is anything I can do about it.

jakobrosenberg commented 7 years ago

I just had another look at entrypoint.sh and I don't see why it shouldn't work as is.

#original line
#semver -r '>=1.3.1' $(cat config.json | jq .meteorRelease | tr -d '"' | cut -f2 -d'@' | cut -d'.' -f1-3)

#Same line but testing directly with METEOR@1.4.3-beta.2
$ semver -r '>=1.3.1' $(echo "METEOR@1.4.3-beta.2" | tr -d '"' | cut -f2 -d'@' | cut -d'.' -f1-3)
1.4.3-beta

$ semver -r '>=1.3.1' $(echo "METEOR@1.4.3-beta.2" | cut -f2 -d'@')
1.4.3-beta.2

It's working fine here. I'm puzzled.

Ulexus commented 7 years ago

I suspect you are using a different semver. When I try it, it fails:

$ semver -r '>=1.3.1' 1.4.3-beta.2
$ echo $?
1

Whereas without the beta:

$ semver -r '>=1.3.1' 1.4.3
1.4.3
$ echo $?
0

Do you know what semver you are using? It is apparently better than the one I have in the container.

jakobrosenberg commented 7 years ago

SemVer 2.1.0

Ulexus commented 7 years ago

Well that's interesting. I'm using SemVer 5.3.0 (Isaac Z Schlüter JS edition). I guess the old version works better.

jakobrosenberg commented 7 years ago

Would it be possible to skip version checking with an environment variable?

Ulexus commented 7 years ago

Done; added IGNORE_METEOR_VERSION as an environment flag. If that is set to anything other than empty string, the warning will still be emitted, but the script will not exit.

Fixed in 2f6a97fa8c0f11afcb43a55f1f4e5af408e3a158

jakobrosenberg commented 7 years ago

Thank you. Much appreciated.

I'll give it a try now.

Ulexus commented 7 years ago

Closing old issue without feedback. Please reopen if the fix didn't work.