From 1695b7832f5cdf779568f45231c363a896e35f3e Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Fri, 1 Mar 2024 10:35:37 -0500 Subject: [PATCH 1/2] Make tags unique --- .yarnrc | 2 ++ scripts/deploy/utils/git/tag/constants.ts | 1 - scripts/deploy/utils/git/tag/tag-utils.ts | 5 ++--- scripts/push-version.sh | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 .yarnrc delete mode 100644 scripts/deploy/utils/git/tag/constants.ts diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 0000000000..7633e78754 --- /dev/null +++ b/.yarnrc @@ -0,0 +1,2 @@ +version-tag-prefix spruce/v +version-git-message "spruce/v%s" diff --git a/scripts/deploy/utils/git/tag/constants.ts b/scripts/deploy/utils/git/tag/constants.ts deleted file mode 100644 index 5241928a40..0000000000 --- a/scripts/deploy/utils/git/tag/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const githubRemote = "https://github.com/evergreen-ci/spruce"; diff --git a/scripts/deploy/utils/git/tag/tag-utils.ts b/scripts/deploy/utils/git/tag/tag-utils.ts index 3fc2efe3db..026b22933a 100644 --- a/scripts/deploy/utils/git/tag/tag-utils.ts +++ b/scripts/deploy/utils/git/tag/tag-utils.ts @@ -1,5 +1,4 @@ import { execSync } from "child_process"; -import { githubRemote } from "./constants"; import { green, underline } from "../../../../utils/colors"; /** @@ -49,7 +48,7 @@ const getLatestTag = () => { */ const deleteTag = (tag: string) => { console.log(`Deleting tag (${tag}) from remote...`); - const deleteCommand = `git push --delete ${githubRemote} ${tag}`; + const deleteCommand = `git push --delete upstream ${tag}`; try { execSync(deleteCommand, { stdio: "inherit", encoding: "utf-8" }); } catch (err) { @@ -63,7 +62,7 @@ const deleteTag = (tag: string) => { const pushTags = () => { console.log("Pushing tags..."); try { - execSync(`git push --tags ${githubRemote}`, { + execSync(`git push --tags upstream`, { stdio: "inherit", encoding: "utf-8", }); diff --git a/scripts/push-version.sh b/scripts/push-version.sh index 024bac9958..49bec03181 100755 --- a/scripts/push-version.sh +++ b/scripts/push-version.sh @@ -1,13 +1,13 @@ #!/bin/bash WAIT_TIME=9 -GITHUB_REMOTE=https://github.com/evergreen-ci/spruce +GIT_DESTINATION=$(git rev-parse --abbrev-ref main@{upstream}) -if git push $GITHUB_REMOTE +if git push upstream then - echo "Successfully pushed to ${GITHUB_REMOTE}" + echo "Successfully pushed to ${GIT_DESTINATION}" else - echo "Failed to push to ${GITHUB_REMOTE}" + echo "Failed to push to ${GIT_DESTINATION}" exit 1 fi @@ -17,11 +17,11 @@ while [ $i -gt 0 ] done echo "" -if git push --tags $GITHUB_REMOTE +if git push --tags upstream then - echo "Successfully pushed tags to ${GITHUB_REMOTE}" + echo "Successfully pushed tags to ${GIT_DESTINATION}" else - echo "Failed to push tags to ${GITHUB_REMOTE}" + echo "Failed to push tags to ${GIT_DESTINATION}" exit 1 fi From 01c9f88e2f98c233a4c70509e2205e2af9ebfe4d Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Fri, 1 Mar 2024 11:00:25 -0500 Subject: [PATCH 2/2] Don't specify branchname (main is implicit) --- scripts/push-version.sh | 2 +- src/gql/generated/types.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/push-version.sh b/scripts/push-version.sh index 49bec03181..79126cf6b9 100755 --- a/scripts/push-version.sh +++ b/scripts/push-version.sh @@ -1,7 +1,7 @@ #!/bin/bash WAIT_TIME=9 -GIT_DESTINATION=$(git rev-parse --abbrev-ref main@{upstream}) +GIT_DESTINATION=$(git rev-parse --abbrev-ref @{upstream}) if git push upstream then diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index da25867e93..769810448e 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -2910,6 +2910,7 @@ export type User = { __typename?: "User"; displayName: Scalars["String"]["output"]; emailAddress: Scalars["String"]["output"]; + parsleyFilters: Array; patches: Patches; permissions: Permissions; subscriptions?: Maybe>;