Remove scripts

This commit is contained in:
adrinr 2023-04-11 16:52:59 +01:00
parent 859b10c4be
commit 5ea8086be0
6 changed files with 0 additions and 166 deletions

View File

@ -33,8 +33,6 @@
"deps:circular": "madge packages/server/dist/index.js packages/worker/src/index.ts packages/backend-core/dist/src/index.js packages/cli/src/index.js --circular",
"release": "lerna publish ${RELEASE_VERSION_TYPE:-patch} --yes --force-publish && yarn release:pro",
"release:develop": "lerna publish prerelease --yes --force-publish --dist-tag develop --exact && yarn release:pro:develop",
"release:pro": "bash scripts/pro/release.sh",
"release:pro:develop": "bash scripts/pro/release.sh develop",
"restore": "yarn run clean && yarn run bootstrap && yarn run build",
"nuke": "yarn run nuke:packages && yarn run nuke:docker",
"nuke:packages": "yarn run restore",
@ -48,7 +46,6 @@
"dev:server": "yarn run kill-server && lerna run --stream --parallel dev:builder --concurrency 1 --scope @budibase/backend-core --scope @budibase/worker --scope @budibase/server",
"dev:built": "cd packages/server && yarn dev:stack:up && cd ../../ && lerna run --stream --parallel dev:built",
"test": "lerna run --stream test --stream",
"test:pro": "bash scripts/pro/test.sh",
"lint:eslint": "eslint packages && eslint qa-core",
"lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --check \"qa-core/**/*.{js,ts,svelte}\"",
"lint": "yarn run lint:eslint && yarn run lint:prettier",
@ -84,7 +81,6 @@
"mode:account": "yarn mode:cloud && yarn env:account:enable",
"security:audit": "node scripts/audit.js",
"postinstall": "husky install",
"install:pro": "bash scripts/pro/install.sh",
"dep:clean": "yarn clean && yarn bootstrap"
}
}

View File

@ -15,8 +15,6 @@
"prebuild": "rimraf dist/",
"prepack": "cp package.json dist",
"build": "tsc -p tsconfig.build.json",
"build:pro": "../../scripts/pro/build.sh",
"postbuild": "yarn run build:pro",
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
"test": "bash scripts/test.sh",
"test:watch": "jest --watchAll"

View File

@ -1,15 +0,0 @@
#!/bin/bash
# This script is designed for building the pro repo after the backend-core build has completed.
# This ensures that any changes in core that are required by pro are done in the correct order.
set -e
# Go to parent of budibase
cd ../../../
if [[ -d "budibase-pro" ]]; then
cd budibase-pro
echo "Building pro"
yarn build
fi

View File

@ -1,39 +0,0 @@
#!/bin/bash
if [[ -z "${CI}" ]]; then
echo 'Cannot run install.sh unless in CI'
exit 0
fi
BRANCH=$1
BASE_BRANCH=$2
cd ../
echo "Cloning pro repo..."
git clone https://$PERSONAL_ACCESS_TOKEN@github.com/Budibase/budibase-pro.git
# Community forks won't be able to clone the pro repo as they can't access secrets
# Skip the rest of the installation and rely on npm version instead
# This should be ok as forks will not rely on pro changes
if [[ -d "budibase-pro" ]]; then
cd budibase-pro
if [[ -z "${BRANCH}" ]]; then
echo Using GITHUB_REF_NAME: $GITHUB_REF_NAME
export BRANCH=$GITHUB_REF_NAME
fi
# Try to checkout the matching pro branch
git checkout $BRANCH
if [[ $? == "1" ]] && [[ $BASE_BRANCH ]]; then
# There is no matching branch, try to match the base branch
git checkout $BASE_BRANCH
fi
# If neither branch exists continue with default branch 'develop'
git pull
echo "Initializing pro repo..."
yarn
fi

View File

@ -1,95 +0,0 @@
#!/bin/bash
# Fail when any command fails
set -e
if [[ -z "${CI}" ]]; then
echo 'Cannot run release.sh unless in CI'
exit 0
fi
#############################################
# SETUP #
#############################################
# Release pro with same version as budibase
VERSION=$(jq -r .version lerna.json)
echo "Version: $VERSION"
COMMAND=$1
echo "Command: $COMMAND"
# Determine tag to use
TAG=""
if [[ $COMMAND == "develop" ]]; then
TAG="develop"
else
TAG="latest"
fi
echo "Releasing version $VERSION"
echo "Releasing tag $TAG"
#############################################
# PRE-PUBLISH #
#############################################
# Go to pro repo root
cd ../budibase-pro
# Install NPM credentials
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
# Sync budibase dependency versions in packages/pro/package.json
# Ensures pro does not use out of date dependency
cd packages/pro
jq '.dependencies."@budibase/backend-core"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json
jq '.dependencies."@budibase/types"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json
# Go back to pro repo root
cd -
# Update lockfile with new dependency versions
yarn clean -y && yarn bootstrap
# Commit and push
git add packages/pro/yarn.lock
git commit -m "Update dependency versions to $VERSION" -n
git push
#############################################
# PUBLISH #
#############################################
lerna publish $VERSION --yes --force-publish --dist-tag $TAG
#############################################
# POST-PUBLISH - BUDIBASE #
#############################################
# Go to budibase repo root
cd ../budibase
# Update pro version in packages/server/package.json
cd packages/server
jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json
# Go back to budibase repo root
cd -
# Update pro version in packages/worker/package.json
cd packages/worker
jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json
# Go back to budibase repo root
cd -
# Update lockfile with new pro version
yarn clean -y && yarn bootstrap
# Commit and push changes
git add packages/server/package.json
git add packages/server/yarn.lock
git add packages/worker/package.json
git add packages/worker/yarn.lock
git commit -m "Update pro version to $VERSION" -n
git push

View File

@ -1,11 +0,0 @@
#!/bin/bash
# Fail when any command fails
set -e
cd ../
if [[ -d "budibase-pro" ]]; then
cd budibase-pro
yarn test
cd ../budibase
fi