some build script reordering

first release variables are set, then, if neccesary, dependencies are set.