notaryproject / notary

Notary is a project that allows anyone to have trust over arbitrary collections of data
Apache License 2.0
3.23k stars 508 forks source link

Make migrate script POSIX compliant #1063

Open ruimarinho opened 7 years ago

ruimarinho commented 7 years ago

The migrate.sh is not currently POSIX compliant. For example, in POSIX sh, [[ ]] is undefined, so the script does not run on golang:1.7-alpine.

Ideally it would be POSIX compliant.

endophage commented 7 years ago

Please provide a little more context on what you're doing/how your running the script. It runs correctly whenever we use the included docker-compose.yml which is associated with our {server,signer}.Dockerfile images, which are both built on golang:1.7.3-alpine.

It's a convenience script to bring local dev databases up to date in a docker-compose context so as long as it runs there, we're not overly concerned about it running elsewhere.

karstengr commented 7 years ago

I faced the same problem trying to get the script running on a Ubuntu based image because alpine is not available for my target architecture. One should not specify 'env sh' and use bash syntax at the same time.