Skip to content

Commit f5f7bb1

Browse files
authored
build: cut-over dist/npm to bazel built artifacts (#1776)
1 parent 4007657 commit f5f7bb1

File tree

1 file changed

+4
-48
lines changed

1 file changed

+4
-48
lines changed

scripts/build.sh

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -40,51 +40,7 @@ yarn install
4040
# Build the npm package with bazel
4141
yarn bazel build //:npm
4242

43-
# Copy the bazel built package to dist/npm_bazel
44-
# TODO: copy to dist/npm when ready to cut-over
45-
mkdir -p dist/npm_bazel
46-
cp -r bazel-bin/npm/ dist/npm_bazel
47-
chmod -R +w dist/npm_bazel
48-
49-
################################################################################
50-
#### LEGACY PRE-BAZEL BUILD --- can be removed after cut-over
51-
################################################################################
52-
53-
# Enable extended pattern matching features
54-
shopt -s extglob
55-
56-
# Clean up from last build
57-
rm -rf **/*.tsbuildinfo
58-
59-
# Build the client and server
60-
yarn run compile
61-
62-
# install npm packages in the pinned v12
63-
pushd v12_language_service
64-
yarn install
65-
popd
66-
67-
# Copy files to package root
68-
cp package.json angular.png CHANGELOG.md README.md dist/npm
69-
# Copy files to server directory
70-
cp -r server/package.json server/README.md server/bin dist/npm/server
71-
cp -r v12_language_service dist/npm/v12_language_service
72-
# Build and copy files to syntaxes directory
73-
yarn run build:syntaxes
74-
mkdir dist/npm/syntaxes
75-
# Copy all json files in syntaxes/ except tsconfig.json
76-
cp syntaxes/!(tsconfig).json dist/npm/syntaxes
77-
78-
pushd dist/npm
79-
# TODO(kyliau): vsce does not bundle nested node_modules due to bug
80-
# https://github.com/microsoft/vscode-vsce/issues/432 so install using NPM for now.
81-
# Note: We also use `--force` as NPM incorrectly checks the dev dependencies even
82-
# though we have limited the install to production-only dependencies. We know that
83-
# our versions are compatible from the Yarn install, so it's acceptable to force proceed
84-
# on peer dependency conflicts (like `tslint@6` not being supported by `tslint-eslint-rules`).
85-
npm install --production --ignore-scripts --force
86-
87-
sed -i -e 's#./dist/client/src/extension#./index#' package.json
88-
../../node_modules/.bin/vsce package
89-
90-
popd
43+
# Copy the bazel built package to dist/npm
44+
mkdir -p dist/npm
45+
cp -r bazel-bin/npm/ dist/npm
46+
chmod -R +w dist/npm

0 commit comments

Comments
 (0)