Skip to content
Open
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
7 changes: 6 additions & 1 deletion tools/release/publish-mvn-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ if [ -z "$PATH_TO_REPO" ]; then
exit 1
fi

# if PATH_TO_REPO is not blank, but does not end with a slash, add one
if [[ "$PATH_TO_REPO" != "/"* ]]; then
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The condition checks if the path does NOT start with a slash (checking for absolute paths), but the comment states it checks if the path does not END with a slash. The logic should be if [[ \"$PATH_TO_REPO\" != */ ]]; then to append a trailing slash when missing, which matches both the comment's intent and the fix described in the PR.

Suggested change
if [[ "$PATH_TO_REPO" != "/"* ]]; then
if [[ "$PATH_TO_REPO" != */ ]]; then

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

without trying it, this suggestion seems correct to me @eschultink

PATH_TO_REPO="$PATH_TO_REPO/"
fi

if [ ! -f "${PATH_TO_REPO}java/pom.xml" ]; then
printf "${RED}${PATH_TO_REPO}java/pom.xml not found. set <path-to-repo> argument to point to the root of a psoxy checkout. Exiting.${NC}\n"
exit 1
fi

printf "${YELLOW}WARNING: this is not recommended; use ${BLUE}gh run publish-mvn-artifacts.yaml --ref <version>${NC}${YELLOW} instead. That will be a more reliable fresh build.${NC}\n"
printf "${YELLOW}WARNING: this is not recommended; use ${BLUE}gh run publish-release-artifacts.yaml --ref <version>${NC}${YELLOW} instead. That will be a more reliable fresh build.${NC}\n"

# 1. Branch/Tag Validation
CURRENT_BRANCH=$(git -C "$PATH_TO_REPO" branch --show-current)
Expand Down
Loading