Sync versions of pro and backend-core
This commit is contained in:
parent
3c3222a406
commit
fa136ba4ca
|
@ -14,7 +14,6 @@ staleLabel: stale
|
||||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||||
markComment: >
|
markComment: >
|
||||||
This issue has been automatically marked as stale because it has not had
|
This issue has been automatically marked as stale because it has not had
|
||||||
recent activity. It will be closed if no further activity occurs. Thank you
|
recent activity.
|
||||||
for your contributions.
|
|
||||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||||
closeComment: false
|
closeComment: false
|
||||||
|
|
|
@ -22,7 +22,8 @@ module.exports = {
|
||||||
MINIO_URL: process.env.MINIO_URL,
|
MINIO_URL: process.env.MINIO_URL,
|
||||||
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
|
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
|
||||||
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
||||||
ACCOUNT_PORTAL_URL: process.env.ACCOUNT_PORTAL_URL,
|
ACCOUNT_PORTAL_URL:
|
||||||
|
process.env.ACCOUNT_PORTAL_URL || "https://account.budibase.app",
|
||||||
ACCOUNT_PORTAL_API_KEY: process.env.ACCOUNT_PORTAL_API_KEY,
|
ACCOUNT_PORTAL_API_KEY: process.env.ACCOUNT_PORTAL_API_KEY,
|
||||||
DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL,
|
DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL,
|
||||||
SELF_HOSTED: !!parseInt(process.env.SELF_HOSTED),
|
SELF_HOSTED: !!parseInt(process.env.SELF_HOSTED),
|
||||||
|
|
|
@ -5,18 +5,16 @@ if [[ -z "${CI}" ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Release pro as same version as budibase
|
#############################################
|
||||||
|
# SETUP #
|
||||||
|
#############################################
|
||||||
|
|
||||||
|
# Release pro with same version as budibase
|
||||||
VERSION=$(jq -r .version lerna.json)
|
VERSION=$(jq -r .version lerna.json)
|
||||||
echo "Version: $VERSION"
|
echo "Version: $VERSION"
|
||||||
COMMAND=$1
|
COMMAND=$1
|
||||||
echo "Command: $COMMAND"
|
echo "Command: $COMMAND"
|
||||||
|
|
||||||
# Go to pro package
|
|
||||||
cd ../budibase-pro
|
|
||||||
|
|
||||||
# Install NPM credentials
|
|
||||||
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} >> .npmrc
|
|
||||||
|
|
||||||
# Determine tag to use
|
# Determine tag to use
|
||||||
TAG=""
|
TAG=""
|
||||||
if [[ $COMMAND == "develop" ]]; then
|
if [[ $COMMAND == "develop" ]]; then
|
||||||
|
@ -27,24 +25,65 @@ fi
|
||||||
|
|
||||||
echo "Releasing version $VERSION"
|
echo "Releasing version $VERSION"
|
||||||
echo "Releasing tag $TAG"
|
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 backend-core version 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
|
||||||
|
|
||||||
|
# Go back to pro repo root
|
||||||
|
cd -
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# PUBLISH #
|
||||||
|
#############################################
|
||||||
|
|
||||||
lerna publish $VERSION --yes --force-publish --dist-tag $TAG
|
lerna publish $VERSION --yes --force-publish --dist-tag $TAG
|
||||||
|
|
||||||
# reset main and types to point to src for dev
|
#############################################
|
||||||
|
# POST-PUBLISH - PRO #
|
||||||
|
#############################################
|
||||||
|
|
||||||
|
# Revert build changes on packages/pro/package.json
|
||||||
cd packages/pro
|
cd packages/pro
|
||||||
jq '.main = "src/index.ts" | .types = "src/index.ts"' package.json > package.json.tmp && mv package.json.tmp package.json
|
jq '.main = "src/index.ts" | .types = "src/index.ts"' package.json > package.json.tmp && mv package.json.tmp package.json
|
||||||
|
|
||||||
|
# Go back to pro repo root
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
# Commit and push changes
|
||||||
git add packages/pro/package.json
|
git add packages/pro/package.json
|
||||||
git commit -m 'Prep dev'
|
git commit -m "Prep next development iteration"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
# POST-PUBLISH - BUDIBASE #
|
||||||
|
#############################################
|
||||||
|
|
||||||
|
# Go to budibase repo root
|
||||||
cd ../budibase
|
cd ../budibase
|
||||||
|
|
||||||
if [[ $COMMAND == "develop" ]]; then
|
# Update pro version in packages/server/package.json
|
||||||
# Pin pro version for develop container build
|
cd packages/server
|
||||||
echo "Pinning pro version"
|
jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp 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 -
|
cd -
|
||||||
cd packages/worker
|
|
||||||
jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json
|
# Update pro version in packages/worker/package.json
|
||||||
fi
|
cd packages/worker
|
||||||
|
jq '.dependencies."@budibase/pro"="'$VERSION'"' package.json > package.json.tmp && mv package.json.tmp package.json
|
||||||
|
|
||||||
|
# Commit and push changes
|
||||||
|
git commit -m "Update pro version to $VERSION"
|
||||||
|
git push
|
Loading…
Reference in New Issue