Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

DEVPROD-5132: Make tags unique #2282

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version-tag-prefix spruce/v
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(comment placement is random) I think you'll want to use the Variant Regex + Task Regex combination instead of the Variant Tags + Task Tags combination! I don't think we use tags in our yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, great catch! I made this update in Spruce project settings.

version-git-message "spruce/v%s"
1 change: 0 additions & 1 deletion scripts/deploy/utils/git/tag/constants.ts

This file was deleted.

5 changes: 2 additions & 3 deletions scripts/deploy/utils/git/tag/tag-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { execSync } from "child_process";
import { githubRemote } from "./constants";
import { green, underline } from "../../../../utils/colors";

/**
Expand Down Expand Up @@ -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) {
Expand All @@ -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",
});
Expand Down
14 changes: 7 additions & 7 deletions scripts/push-version.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

WAIT_TIME=9
GITHUB_REMOTE=https://github.com/evergreen-ci/spruce
GIT_DESTINATION=$(git rev-parse --abbrev-ref @{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

Expand All @@ -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

1 change: 1 addition & 0 deletions src/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2910,6 +2910,7 @@ export type User = {
__typename?: "User";
displayName: Scalars["String"]["output"];
emailAddress: Scalars["String"]["output"];
parsleyFilters: Array<ParsleyFilter>;
patches: Patches;
permissions: Permissions;
subscriptions?: Maybe<Array<GeneralSubscription>>;
Expand Down
Loading