Improve versioning script