File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
scripts/setup-bazel-remote-exec Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ version: 2.1
55orbs :
66 buildalert : oss-tools/buildalert@0.1.0
77 win : circleci/windows@2.2.0
8- devinfra : angular/dev-infra@1.0.6
8+ devinfra : angular/dev-infra@1.0.7
99
1010# **Note**: When updating the beginning of the cache key, also update the cache key to match
1111# the new cache key prefix. This allows us to take advantage of CircleCI's fallback caching.
@@ -79,9 +79,9 @@ commands:
7979 setup_bazel_config :
8080 description : ' Setting up Bazel configuration for CI'
8181 steps :
82- - run : echo "import %workspace%/.circleci/linux-bazel.rc" >> ./.bazelrc
82+ - run : echo "import %workspace%/.circleci/linux-bazel.rc" >> ./.bazelrc.user
8383 - devinfra/setup-bazel-remote-exec :
84- bazelrc : .circleci/linux-bazel.rc
84+ bazelrc : ./.bazelrc.user
8585
8686 prepare_and_store_test_results :
8787 description : ' Prepare and upload test results'
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary")
22
33ORB_NAME = "angular/dev-infra"
44
5- ORB_VERSION = "1.0.6 "
5+ ORB_VERSION = "1.0.7 "
66
77nodejs_binary (
88 name = "pack_orb_script" ,
Original file line number Diff line number Diff line change @@ -28,12 +28,20 @@ async function main(bazelRcPath: string | undefined) {
2828 await fs . promises . writeFile ( destPath , dec , 'utf8' ) ;
2929
3030 if ( bazelRcPath ) {
31- let content = await fs . promises . readFile ( bazelRcPath , 'utf8' ) ;
31+ let content = await readFileGracefully ( bazelRcPath ) ;
3232 content += '\nbuild --config=remote' ;
3333 await fs . promises . writeFile ( bazelRcPath , content , 'utf8' ) ;
3434 }
3535}
3636
37+ async function readFileGracefully ( filePath : string ) : Promise < string > {
38+ try {
39+ return await fs . promises . readFile ( filePath , 'utf8' ) ;
40+ } catch {
41+ return '' ;
42+ }
43+ }
44+
3745main ( process . env . BAZELRC_PATH ) . catch ( ( e ) => {
3846 console . error ( e ) ;
3947 process . exitCode = 1 ;
You can’t perform that action at this time.
0 commit comments