From e82ff346e16c5c6757e5d313db457411ebf289ca Mon Sep 17 00:00:00 2001 From: Julio Ortega Date: Mon, 4 Dec 2023 13:00:00 -0600 Subject: [PATCH] chore: cleanup --- packages/dialtone-vue2/release.sh | 46 ----------------------- packages/dialtone-vue2/scripts/release.sh | 26 ------------- packages/dialtone-vue3/release.sh | 46 ----------------------- packages/dialtone-vue3/scripts/release.sh | 26 ------------- 4 files changed, 144 deletions(-) delete mode 100755 packages/dialtone-vue2/release.sh delete mode 100755 packages/dialtone-vue2/scripts/release.sh delete mode 100755 packages/dialtone-vue3/release.sh delete mode 100755 packages/dialtone-vue3/scripts/release.sh diff --git a/packages/dialtone-vue2/release.sh b/packages/dialtone-vue2/release.sh deleted file mode 100755 index 32f7a375a6..0000000000 --- a/packages/dialtone-vue2/release.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# exit when any command fails -set -e - -# get latest dialtone version number -dialtoneLatest=$(npm show @dialpad/dialtone version) - -# get current dialtone version in package.json, remove the ^ -dialtoneDevVersion=$(node -p "require('./package.json').devDependencies['@dialpad/dialtone']" | sed 's/\^//') -peerDialtoneVersion=$(node -p "require('./package.json').peerDependencies['@dialpad/dialtone']" | sed 's/>=//') - -# check that we are using the latest version of dialtone currently available. -if [ $dialtoneLatest != $dialtoneDevVersion ]; then - read -r -p "The dialtone version in package.json is not the latest version of dialtone vue. Would you like to continue? (y/N): " response - response=$(echo "$response" | awk '{print tolower($0)}') - echo $response - if [[ "$response" =~ (no|n| ) ]] || [[ -z $response ]]; then - exit 0 - fi -fi - -# remove patch version from dialtoneDevVersion and compare to make sure it matches the peer dep version. Peer dep version should always match the major and minor of the dev version. -if [ ${dialtoneDevVersion%.*} != $peerDialtoneVersion ]; then - read -r -p "The @dialpad/dialtone peer dependency version in package.json does not match the minor version of the one in devDependencies. It is recommended you fix this. Would you like to continue? (y/N): " response - response=$(echo "$response" | awk '{print tolower($0)}') - if [[ "$response" =~ (no|n| ) ]] || [[ -z $response ]]; then - exit 0 - fi -fi - -echo "Enter the name of the version segment you are incrementing (Ex/ major, minor, patch. 'npm version --help' in your cli for all possible args): " -read npmVersionArgument -branch=$(git branch --show-current) - -echo "Committing new npm version and setting git tag" -npmcmd="npm version $npmVersionArgument" -echo "$npmcmd" -$npmcmd - -version=$(git describe --tags --abbrev=0) - -echo "Pushing new commit and tag to remote" -pushcmd="git push --atomic origin $branch $version" -echo "$pushcmd" -$pushcmd diff --git a/packages/dialtone-vue2/scripts/release.sh b/packages/dialtone-vue2/scripts/release.sh deleted file mode 100755 index ece266513c..0000000000 --- a/packages/dialtone-vue2/scripts/release.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -set -e - -branch="$(git rev-parse --abbrev-ref HEAD)" - -if ! [[ "$branch" =~ ^staging(-vue3)?$ ]]; then - echo "This script can only be run while on staging or staging-vue3 branches" - exit 1; -fi - -git pull && -npx semantic-release --no-ci --extends ./release-local.config.cjs; - -case $branch in - "staging") - git checkout production && - git merge --ff-only staging && - git push -u origin production - ;; - - "staging-vue3") - git checkout vue3 && - git merge --ff-only staging-vue3 && - git push -u origin vue3 - ;; -esac \ No newline at end of file diff --git a/packages/dialtone-vue3/release.sh b/packages/dialtone-vue3/release.sh deleted file mode 100755 index 095bc0b42b..0000000000 --- a/packages/dialtone-vue3/release.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# exit when any command fails -set -e - -# get latest dialtone version number -dialtoneLatest=$(pnpm show @dialpad/dialtone version) - -# get current dialtone version in package.json, remove the ^ -dialtoneDevVersion=$(node -p "require('./package.json').devDependencies['@dialpad/dialtone']" | sed 's/\^//') -peerDialtoneVersion=$(node -p "require('./package.json').peerDependencies['@dialpad/dialtone']" | sed 's/>=//') - -# check that we are using the latest version of dialtone currently available. -if [ $dialtoneLatest != $dialtoneDevVersion ]; then - read -r -p "The dialtone version in package.json is not the latest version of dialtone vue. Would you like to continue? (y/N): " response - response=$(echo "$response" | awk '{print tolower($0)}') - echo $response - if [[ "$response" =~ (no|n| ) ]] || [[ -z $response ]]; then - exit 0 - fi -fi - -# remove patch version from dialtoneDevVersion and compare to make sure it matches the peer dep version. Peer dep version should always match the major and minor of the dev version. -if [ ${dialtoneDevVersion%.*} != $peerDialtoneVersion ]; then - read -r -p "The @dialpad/dialtone peer dependency version in package.json does not match the minor version of the one in devDependencies. It is recommended you fix this. Would you like to continue? (y/N): " response - response=$(echo "$response" | awk '{print tolower($0)}') - if [[ "$response" =~ (no|n| ) ]] || [[ -z $response ]]; then - exit 0 - fi -fi - -echo "Enter the name of the version segment you are incrementing (Ex/ major, minor, patch. 'pnpm version --help' in your cli for all possible args): " -read npmVersionArgument -branch=$(git branch --show-current) - -echo "Committing new npm version and setting git tag" -npmcmd="npm version $npmVersionArgument" -echo "$npmcmd" -$npmcmd - -version=$(git describe --tags --abbrev=0) - -echo "Pushing new commit and tag to remote" -pushcmd="git push --atomic origin $branch $version" -echo "$pushcmd" -$pushcmd diff --git a/packages/dialtone-vue3/scripts/release.sh b/packages/dialtone-vue3/scripts/release.sh deleted file mode 100755 index ece266513c..0000000000 --- a/packages/dialtone-vue3/scripts/release.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -set -e - -branch="$(git rev-parse --abbrev-ref HEAD)" - -if ! [[ "$branch" =~ ^staging(-vue3)?$ ]]; then - echo "This script can only be run while on staging or staging-vue3 branches" - exit 1; -fi - -git pull && -npx semantic-release --no-ci --extends ./release-local.config.cjs; - -case $branch in - "staging") - git checkout production && - git merge --ff-only staging && - git push -u origin production - ;; - - "staging-vue3") - git checkout vue3 && - git merge --ff-only staging-vue3 && - git push -u origin vue3 - ;; -esac \ No newline at end of file