File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 with :
2929 bazelrc : .bazelrc
3030 - run : pnpm install --frozen-lockfile
31- - run : pnpm bazel build //ng-dev:npm_package --config=release
31+ - run : bash ./tools/build-all.sh
3232 - name : Publish Snapshots
3333 env :
3434 GITHUB_TOKEN : ${{ secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -5,6 +5,18 @@ export const release = {
55 name : '@angular/ng-dev' ,
66 snapshotRepo : 'dev-infra-private-ng-dev-builds' ,
77 } ,
8+ {
9+ name : 'rules_angular' ,
10+ snapshotRepo : 'rules_angular' ,
11+ } ,
12+ {
13+ name : 'rules_browsers' ,
14+ snapshotRepo : 'rules_browsers' ,
15+ } ,
16+ {
17+ name : 'rules_sass' ,
18+ snapshotRepo : 'rules_sass' ,
19+ } ,
820 ] ,
921 buildPackages : async ( ) => {
1022 // TODO: Create a standard build script instead of expecting the build to already be complete
@@ -13,6 +25,18 @@ export const release = {
1325 name : '@angular/ng-dev' ,
1426 outputPath : './dist/bin/ng-dev/npm_package' ,
1527 } ,
28+ {
29+ name : 'rules_angular' ,
30+ outputPath : './dist/rules/rules_angular' ,
31+ } ,
32+ {
33+ name : 'rules_browsers' ,
34+ outputPath : './dist/rules/rules_browsers' ,
35+ } ,
36+ {
37+ name : 'rules_sass' ,
38+ outputPath : './dist/rules/rules_sass' ,
39+ } ,
1640 ] ;
1741 } ,
1842} ;
Original file line number Diff line number Diff line change 1+ # rules_angular
2+
3+ > [ !IMPORTANT]
4+ > The source code for this library is maintained in the [ angular/dev-infra] ( https://github.com/angular/dev-infra ) repository.
5+ > Please open any issues or pull requests in that repository.
Original file line number Diff line number Diff line change 11# rules_browsers
22
3+ > [ !IMPORTANT]
4+ > The source code for this library is maintained in the [ angular/dev-infra] ( https://github.com/angular/dev-infra ) repository.
5+ > Please open any issues or pull requests in that repository.
6+
37Use browsers in Bazel and run tests with them.
48
59## Usage
Original file line number Diff line number Diff line change 1+ # rules_sass
2+
3+ > [ !IMPORTANT]
4+ > The source code for this library is maintained in the [ angular/dev-infra] ( https://github.com/angular/dev-infra ) repository.
5+ > Please open any issues or pull requests in that repository.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Bash script to build all packages and modules in the dev-infra repository.
4+ set -e
5+
6+ # Ensure the script runs from the repository root.
7+ cd " $( dirname " $0 " ) /.."
8+
9+ # 1. Build the ng-dev npm package using Bazel in release mode.
10+ echo " Building //ng-dev:npm_package..."
11+ pnpm bazel build //ng-dev:npm_package --config=release
12+
13+ # 2. Package each rule module by creating a git archive and extracting it.
14+ # This ensures that only tracked files are included in the output.
15+ mkdir -p dist
16+
17+ for rule_path in bazel/rules/rules_* ; do
18+ if [ -d " $rule_path " ]; then
19+ rule_name=$( basename " $rule_path " )
20+ target_dir=" dist/rules/$rule_name "
21+
22+ echo " Packaging $rule_name into $target_dir ..."
23+
24+ # Ensure target directory exists and is empty
25+ rm -rf " $target_dir "
26+ mkdir -p " $target_dir "
27+
28+ # Create a temporary tree-ish that includes uncommitted changes.
29+ # If no changes exist, git stash create returns empty, so we fall back to HEAD.
30+ tree_ish=$( git stash create)
31+ if [ -z " $tree_ish " ]; then
32+ tree_ish=" HEAD"
33+ fi
34+
35+ # Archive the content of the rule directory and extract it into dist.
36+ git archive " $tree_ish " :" $rule_path " | tar -x -C " $target_dir "
37+ fi
38+ done
39+
40+ echo " Build all completed successfully."
You can’t perform that action at this time.
0 commit comments