Remove packageNames file usages
This commit is contained in:
parent
543ecb8d58
commit
fb1db135cf
|
@ -12,4 +12,3 @@ packages/server/scripts/
|
|||
!yarn.lock
|
||||
!lerna.json
|
||||
!.yarnrc
|
||||
!packageNames.txt
|
|
@ -29,8 +29,6 @@ jobs:
|
|||
cache: "yarn"
|
||||
- name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Generate package names file
|
||||
run: ./scripts/generatePackageNamesFile.sh
|
||||
- name: Run Yarn
|
||||
run: yarn
|
||||
- name: Run Yarn Build
|
||||
|
|
|
@ -105,4 +105,3 @@ budibase-component
|
|||
budibase-datasource
|
||||
|
||||
*.iml
|
||||
packageNames.txt
|
||||
|
|
|
@ -10,7 +10,6 @@ COPY package.json .
|
|||
COPY yarn.lock .
|
||||
COPY lerna.json .
|
||||
COPY .yarnrc .
|
||||
COPY packageNames.txt .
|
||||
|
||||
COPY packages/server/package.json packages/server/package.json
|
||||
COPY packages/worker/package.json packages/worker/package.json
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#!/bin/bash
|
||||
yarn build --scope @budibase/server --scope @budibase/worker
|
||||
./scripts/generatePackageNamesFile.sh
|
||||
docker build -f hosting/single/Dockerfile.v2 -t budibase:latest .
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
workspace_info=$(yarn --silent workspaces info)
|
||||
|
||||
package_names_file="packageNames.txt"
|
||||
|
||||
rm -f $package_names_file
|
||||
|
||||
|
||||
packages=$(echo "$workspace_info" | jq -r 'keys[]')
|
||||
echo "$packages" > $package_names_file
|
|
@ -1,23 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
exclude_packages=()
|
||||
|
||||
while getopts "e:" opt; do
|
||||
case $opt in
|
||||
e)
|
||||
exclude_packages+=("$OPTARG")
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
packages_to_remove=(
|
||||
@budibase/backend-core
|
||||
@budibase/bbui
|
||||
@budibase/builder
|
||||
@budibase/cli
|
||||
@budibase/client
|
||||
@budibase/frontend-core
|
||||
@budibase/pro
|
||||
@budibase/sdk
|
||||
@budibase/server
|
||||
@budibase/shared-core
|
||||
# We cannot remove string-templates yet because it cannot be bundled by esbuild as a dependency
|
||||
@budibase/string-templates
|
||||
@budibase/types
|
||||
@budibase/worker
|
||||
)
|
||||
|
||||
|
||||
root_package_json=$(cat "package.json")
|
||||
|
@ -27,20 +25,12 @@ process_package() {
|
|||
local package_json=$(cat "$pkg/package.json")
|
||||
local has_changes=false
|
||||
|
||||
|
||||
|
||||
while IFS= read -r package_name; do
|
||||
for exclude_package in "${exclude_packages[@]}"; do
|
||||
if [ "$package_name" == "$exclude_package" ]; then
|
||||
continue 2 # Skip this package and continue with the next one
|
||||
fi
|
||||
done
|
||||
|
||||
for package_name in "${packages_to_remove[@]}"; do
|
||||
if echo "$package_json" | jq -e --arg package_name "$package_name" '.dependencies | has($package_name)' > /dev/null; then
|
||||
package_json=$(echo "$package_json" | jq "del(.dependencies[\"$package_name\"])")
|
||||
has_changes=true
|
||||
fi
|
||||
done < "packageNames.txt"
|
||||
done
|
||||
|
||||
if [ "$has_changes" = true ]; then
|
||||
echo "$package_json" > "$1/package.json"
|
||||
|
|
Loading…
Reference in New Issue