Skip to content

Commit

Permalink
Cleaning up remnants of old vsce publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
joehan committed Oct 21, 2024
1 parent 4d87465 commit 2a276c4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 75 deletions.
48 changes: 0 additions & 48 deletions scripts/publish-vsce.sh

This file was deleted.

17 changes: 2 additions & 15 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
set -e

printusage() {
echo "publish.sh <version> [vscode-version]"
echo "publish.sh <version>"
echo "REPOSITORY_ORG and REPOSITORY_NAME should be set in the environment."
echo "e.g. REPOSITORY_ORG=user, REPOSITORY_NAME=repo"
echo ""
echo "Arguments:"
echo " version: 'patch', 'minor', or 'major'."
echo " vscode-version: Optional. If omitted, defaults to <version>. May be 'patch', 'minor', or 'major'."
}

VERSION=$1
Expand All @@ -20,14 +19,6 @@ elif [[ ! ($VERSION == "patch" || $VERSION == "minor" || $VERSION == "major") ]]
exit 1
fi

VSCODE_VERSION=$2
if [[ $VSCODE_VERSION == "" ]]; then
VSCODE_VERSION=$VERSION
elif [[ ! ($VSCODE_VERSION == "patch" || $VSCODE_VERSION == "minor" || $VSCODE_VERSION == "major") ]]; then
printusage
exit 1
fi

if [[ $REPOSITORY_ORG == "" ]]; then
printusage
exit 1
Expand Down Expand Up @@ -94,10 +85,6 @@ npm version $VERSION
NEW_VERSION=$(jq -r ".version" package.json)
echo "Made a $VERSION version."

echo "Publishing a $VSCODE_VERSION version of the VSCode extension..."
# bash ./scripts/publish-vsce.sh $VSCODE_VERSION $NEW_VERSION
echo "Published a $VSCODE_VERSION version of the VSCode extension."

echo "Making the release notes..."
RELEASE_NOTES_FILE=$(mktemp)
echo "[DEBUG] ${RELEASE_NOTES_FILE}"
Expand All @@ -113,7 +100,7 @@ echo "Published to npm."
echo "Cleaning up release notes..."
rm CHANGELOG.md
touch CHANGELOG.md
git commit -m "[firebase-release] Removed change log and reset repo after ${NEW_VERSION} release" CHANGELOG.md firebase-vscode/CHANGELOG.md firebase-vscode/package.json firebase-vscode/package-lock.json
git commit -m "[firebase-release] Removed change log and reset repo after ${NEW_VERSION} release" CHANGELOG.md
echo "Cleaned up release notes."

echo "Pushing to GitHub..."
Expand Down
3 changes: 1 addition & 2 deletions scripts/publish/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ steps:
# Publish the package.
- name: "gcr.io/$PROJECT_ID/package-builder"
dir: "${_REPOSITORY_NAME}"
args: ["bash", "./scripts/publish.sh", "${_VERSION}", "${_VSCODE_VERSION}"]
args: ["bash", "./scripts/publish.sh", "${_VERSION}"]
env:
- "REPOSITORY_ORG=${_REPOSITORY_ORG}"
- "REPOSITORY_NAME=${_REPOSITORY_NAME}"
Expand Down Expand Up @@ -126,7 +126,6 @@ options:

substitutions:
_VERSION: ""
_VSCODE_VERSION: ""
_KEY_RING: "cloud-build-ring"
_KEY_NAME: "publish"
_REPOSITORY_ORG: "firebase"
Expand Down
11 changes: 1 addition & 10 deletions scripts/publish/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ printusage() {
echo ""
echo "Arguments:"
echo " version: 'patch', 'minor', or 'major'."
echo " vscode_version: 'patch', 'minor', or 'major'. Defaults to same as version if omitted"
}

VERSION=$1
Expand All @@ -18,14 +17,6 @@ elif [[ ! ($VERSION == "patch" || $VERSION == "minor" || $VERSION == "major") ]]
exit 1
fi

VSCODE_VERSION=$2

if [[ $VSCODE_VERSION == "" ]]; then
VSCODE_VERSION=$VERSION
elif [[ ! ($VSCODE_VERSION == "patch" || $VSCODE_VERSION == "minor" || $VSCODE_VERSION == "major") ]]; then
printusage
exit 1
fi
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

cd "$THIS_DIR"
Expand All @@ -34,5 +25,5 @@ gcloud --project fir-tools-builds \
builds \
submit \
--machine-type=e2-highcpu-8 \
--substitutions=_VERSION=$VERSION,_VSCODE_VERSION=$VSCODE_VERSION \
--substitutions=_VERSION=$VERSION, \
.

0 comments on commit 2a276c4

Please sign in to comment.