diff --git a/scripts/publish-vsce.sh b/scripts/publish-vsce.sh deleted file mode 100755 index 48e2f781d7f..00000000000 --- a/scripts/publish-vsce.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -set -e - -printusage() { - echo "publish-vsce.sh " - echo "Should be run as part of publish.sh." - echo "" - echo "" - echo "Arguments:" - echo " version: 'patch', 'minor', or 'major'." - echo " cli-version-number: the version number of the CLI code that is bundled in this release." -} - -VERSION=$1 - -CLI_VERSION=$2 -if [[ ($VERSION == "" || $CLI_VERSION == "") ]]; then - printusage - exit 1 -elif [[ ! ($VERSION == "patch" || $VERSION == "minor" || $VERSION == "major") ]]; then - printusage - exit 1 -fi - -cd firebase-vscode - -echo "Making a $VERSION version of VSCode..." -npm version $VERSION -NEW_VSCODE_VERSION=$(jq -r ".version" package.json) -NEXT_HEADER="## NEXT" -NEW_HEADER="## NEXT\n\n## $NEW_VSCODE_VERSION\n\n- Updated internal firebase-tools dependency to $CLI_VERSION" -sed -i -e "s/$NEXT_HEADER/$NEW_HEADER/g" CHANGELOG.md -echo "Made a $VERSION version of VSCode." - -echo "Running npm install for VSCode..." -npm install -echo "Ran npm install for VSCode." - -echo "Building firebase-vscode .VSIX file" -NODE_OPTIONS="--max-old-space-size=8192" npm run pkg -echo "Built firebase-vscode .VSIX file." - -echo "Uploading VSIX file to GCS..." -VSIX="firebase-vscode-$NEW_VSCODE_VERSION.vsix" -gsutil cp $VSIX gs://firemat-preview-drop/vsix/$VSIX -gsutil cp $VSIX gs://firemat-preview-drop/vsix/firebase-vscode-latest.vsix -echo "Uploaded VSIX file to GCS." -cd .. \ No newline at end of file diff --git a/scripts/publish.sh b/scripts/publish.sh index 8efeaa98004..0b9b72f04c2 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -2,13 +2,12 @@ set -e printusage() { - echo "publish.sh [vscode-version]" + echo "publish.sh " 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 . May be 'patch', 'minor', or 'major'." } VERSION=$1 @@ -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 @@ -52,11 +43,6 @@ trap "echo 'Missing jq.'; exit 1" ERR which jq &> /dev/null trap - ERR -trap "echo 'Missing gsutil.'; exit 1" ERR -which gsutil &> /dev/null -trap - ERR -echo "Checked for commands." - echo "Checking for logged-in npm user..." trap "echo 'Please login to npm using \`npm login --registry https://wombat-dressing-room.appspot.com\`'; exit 1" ERR npm whoami --registry https://wombat-dressing-room.appspot.com @@ -94,10 +80,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}" @@ -113,7 +95,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..." diff --git a/scripts/publish/cloudbuild.yaml b/scripts/publish/cloudbuild.yaml index 775079346d6..cc8cc227e45 100644 --- a/scripts/publish/cloudbuild.yaml +++ b/scripts/publish/cloudbuild.yaml @@ -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}" @@ -126,7 +126,6 @@ options: substitutions: _VERSION: "" - _VSCODE_VERSION: "" _KEY_RING: "cloud-build-ring" _KEY_NAME: "publish" _REPOSITORY_ORG: "firebase" diff --git a/scripts/publish/run.sh b/scripts/publish/run.sh index eab7cb4eff4..2b942f53da4 100755 --- a/scripts/publish/run.sh +++ b/scripts/publish/run.sh @@ -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 @@ -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" @@ -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, \ . \ No newline at end of file