From b038107d7692e8baeeb6a9ea426f4f8b4eb2db80 Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Tue, 3 Sep 2019 09:46:53 -0700 Subject: [PATCH] Fix #75639 --- .../publish-types/publish-types.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build/azure-pipelines/publish-types/publish-types.yml b/build/azure-pipelines/publish-types/publish-types.yml index d377226366a..6808054b3f1 100644 --- a/build/azure-pipelines/publish-types/publish-types.yml +++ b/build/azure-pipelines/publish-types/publish-types.yml @@ -15,6 +15,22 @@ steps: inputs: versionSpec: "1.x" +- bash: | + TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) + CHANNEL="G1C14HJ2F" + + if [ "$TAG_VERSION" == "1.999.0" ]; then + MESSAGE=". Someone pushed 1.999.0 tag. Please delete it ASAP from remote and local." + + curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \ + -H 'Content-type: application/json; charset=utf-8' \ + --data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE"'"}' \ + https://slack.com/api/chat.postMessage + + exit 1 + fi + displayName: Check 1.999.0 tag + - bash: | # Install build dependencies (cd build && yarn)