Remove
This commit is contained in:
parent
a2faf57b46
commit
e48c51b086
|
@ -19,9 +19,6 @@ RUN chmod +x ./scripts/removeWorkspaceDependencies.sh
|
||||||
RUN ./scripts/removeWorkspaceDependencies.sh packages/server/package.json
|
RUN ./scripts/removeWorkspaceDependencies.sh packages/server/package.json
|
||||||
RUN ./scripts/removeWorkspaceDependencies.sh packages/worker/package.json
|
RUN ./scripts/removeWorkspaceDependencies.sh packages/worker/package.json
|
||||||
|
|
||||||
|
|
||||||
# We will never want to sync pro, but the script is still required
|
|
||||||
RUN echo '' > scripts/syncProPackage.js
|
|
||||||
RUN jq 'del(.scripts.postinstall)' package.json > temp.json && mv temp.json package.json
|
RUN jq 'del(.scripts.postinstall)' package.json > temp.json && mv temp.json package.json
|
||||||
RUN ./scripts/removeWorkspaceDependencies.sh package.json
|
RUN ./scripts/removeWorkspaceDependencies.sh package.json
|
||||||
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production --frozen-lockfile
|
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --production --frozen-lockfile
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
"yargs": "^17.7.2"
|
"yargs": "^17.7.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "node scripts/syncProPackage.js",
|
|
||||||
"get-past-client-version": "node scripts/getPastClientVersion.js",
|
"get-past-client-version": "node scripts/getPastClientVersion.js",
|
||||||
"setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev",
|
"setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev",
|
||||||
"build": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream",
|
"build": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream",
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
const fs = require("fs")
|
|
||||||
const path = require("path")
|
|
||||||
const { execSync } = require("child_process")
|
|
||||||
|
|
||||||
let version = "0.0.0"
|
|
||||||
const localPro = fs.existsSync("packages/pro/src")
|
|
||||||
if (!localPro) {
|
|
||||||
version = "latest"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the list of workspaces with mismatched dependencies
|
|
||||||
const output = execSync("yarn --silent workspaces info --json", {
|
|
||||||
encoding: "utf-8",
|
|
||||||
})
|
|
||||||
const data = JSON.parse(output)
|
|
||||||
|
|
||||||
// Loop through each workspace and update the dependencies
|
|
||||||
Object.keys(data).forEach(workspace => {
|
|
||||||
// Loop through each dependency and update its version in package.json
|
|
||||||
const packageJsonPath = path.join(data[workspace].location, "package.json")
|
|
||||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"))
|
|
||||||
if (packageJson.version !== "0.0.0") {
|
|
||||||
// Don't change if we are not using local versions
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let hasChanges = false
|
|
||||||
|
|
||||||
if (packageJson.dependencies && packageJson.dependencies["@budibase/pro"]) {
|
|
||||||
packageJson.dependencies["@budibase/pro"] = version
|
|
||||||
hasChanges = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write changes to package.json if there are any
|
|
||||||
if (hasChanges) {
|
|
||||||
fs.writeFileSync(
|
|
||||||
packageJsonPath,
|
|
||||||
JSON.stringify(packageJson, null, 2) + "\n"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
Loading…
Reference in New Issue