Smart script
This commit is contained in:
parent
c9ab1f4a36
commit
50a0662a99
|
@ -22,7 +22,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn bootstrap && yarn build && yarn dev",
|
||||
"bootstrap": "./scripts/bootstrap.sh && lerna link && ./scripts/link-dependencies.sh",
|
||||
"bootstrap": "node scripts/syncProPackage.js && yarn && ./scripts/bootstrap.sh && lerna link && ./scripts/link-dependencies.sh",
|
||||
"build": "lerna run --stream build",
|
||||
"build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput",
|
||||
"backend:bootstrap": "./scripts/scopeBackend.sh && yarn run bootstrap",
|
||||
|
@ -80,8 +80,8 @@
|
|||
"security:audit": "node scripts/audit.js",
|
||||
"postinstall": "husky install",
|
||||
"dep:clean": "yarn clean -y && yarn bootstrap",
|
||||
"submodules:load": "git submodule init && git submodule update && yarn && yarn bootstrap",
|
||||
"submodules:unload": "git submodule deinit --all && yarn && yarn bootstrap"
|
||||
"submodules:load": "git submodule init && git submodule update && yarn bootstrap",
|
||||
"submodules:unload": "git submodule deinit --all && yarn bootstrap"
|
||||
},
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
|
|
|
@ -2,15 +2,17 @@ const fs = require("fs")
|
|||
const path = require("path")
|
||||
const { execSync } = require("child_process")
|
||||
|
||||
// Get the version argument from the command line
|
||||
let version = process.argv[2]
|
||||
if (!version) {
|
||||
console.error("Usage: node updateLocalPro.js <develop|latest|local>")
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (version === "local") {
|
||||
version = "0.0.1"
|
||||
let version = "0.0.1"
|
||||
const localPro = fs.existsSync("/packages/pro/packages")
|
||||
if (!localPro) {
|
||||
const branchName = execSync("git rev-parse --abbrev-ref HEAD")
|
||||
.toString()
|
||||
.trim()
|
||||
if (branchName === "master") {
|
||||
version = "latest"
|
||||
} else {
|
||||
version = "develop"
|
||||
}
|
||||
}
|
||||
|
||||
// Get the list of workspaces with mismatched dependencies
|
Loading…
Reference in New Issue