1#!/bin/bash 2 3set -eux 4 5if [ $# -lt 1 ]; then 6 echo "usage $0 <version-name>" 7 exit 1; 8fi 9readonly VERSION_NAME=$1 10shift 1 11 12$(dirname $0)/validate-dagger-version.sh "$VERSION_NAME" 13 14# Set the version string that is used as a tag in all of our libraries. If 15# another repo depends on a versioned tag of Dagger, their java_library.tags 16# should match the versioned release. 17sed -i s/'${project.version}'/"${VERSION_NAME}"/g build_defs.bzl 18 19# Note: We avoid commiting until after deploying in case deploying fails and 20# we need to run the script again. 21git commit -m "${VERSION_NAME} release" build_defs.bzl 22git tag -a -m "Dagger ${VERSION_NAME}" dagger-"${VERSION_NAME}" 23git push origin tag dagger-"${VERSION_NAME}" 24