You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m getting increasingly confused while working on the vapor script which one it actually is, especially when I install them somewhere and then run self-update. This would probably also be useful for self-update to report what versions it’s dealing with.
Not sure what the best mechanism would be for this. Since we distribute only the actual script itself, it would either have to be a (manually updated) variable inside the script that a version command echoes. Or we could have the script run an md5 or sha1 sum on itself and return that.
The latter option would mean there’s no need to maintain a version variable but the downside is we’d either need to pull in some pure swift implementation of md5 or sha1 or find a command line tool that’s widely available to do a system call for.
OSX has md5 but the ubuntu 14.04 I just checked doesn’t.
A variable is probably best even though there’s a good chance it’ll grow stale. The hash option feels like overkill.
PS: If I get the compiled version of the vapor script to run on Linux and in case that becomes the default way to install it, a hash function in the script should to ok performance wise, although the source file would get bigger.
The text was updated successfully, but these errors were encountered:
I’m getting increasingly confused while working on the
vapor
script which one it actually is, especially when I install them somewhere and then run self-update. This would probably also be useful for self-update to report what versions it’s dealing with.Not sure what the best mechanism would be for this. Since we distribute only the actual script itself, it would either have to be a (manually updated) variable inside the script that a
version
command echoes. Or we could have the script run an md5 or sha1 sum on itself and return that.The latter option would mean there’s no need to maintain a version variable but the downside is we’d either need to pull in some pure swift implementation of md5 or sha1 or find a command line tool that’s widely available to do a
system
call for.OSX has
md5
but the ubuntu 14.04 I just checked doesn’t.A variable is probably best even though there’s a good chance it’ll grow stale. The hash option feels like overkill.
PS: If I get the compiled version of the
vapor
script to run on Linux and in case that becomes the default way to install it, a hash function in the script should to ok performance wise, although the source file would get bigger.The text was updated successfully, but these errors were encountered: