Add prerelease support to build script

[ci skip]
Merge branch 'master' into geezer

[ci skip]