Skip to content

Commit 85619c6

Browse files
devversionmmalerba
authored andcommitted
build: make built dev-app web package writable (#18481)
Bazel by default marks output files as `readonly` to ensure hermeticity. Since we moved these files out of the `bazel-bin` directory, we should make the files writable. This is necessary so that subsequent runs of this script can delete the old `distPath` contents.
1 parent 1cb7099 commit 85619c6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/deploy-dev-app.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* deployed to the currently configured Firebase project.
66
*/
77

8-
const {exec, set, cd, cp, rm} = require('shelljs');
8+
const {exec, set, cd, cp, rm, chmod} = require('shelljs');
99
const {join} = require('path');
1010

1111
// ShellJS should throw if any command fails.
@@ -37,5 +37,10 @@ rm('-Rf', distPath);
3737
// of a public folder outside of the "firebase.json" file.
3838
cp('-R', webPackagePath, distPath);
3939

40+
// Bazel by default marks output files as `readonly` to ensure hermeticity. Since we moved
41+
// these files out of the `bazel-bin` directory, we should make them writable. This is necessary
42+
// so that subsequent runs of this script can delete old contents from the deployment dist folder.
43+
chmod('-R', 'u+w', distPath);
44+
4045
// Run the Firebase CLI to deploy the hosting target.
4146
exec(`yarn -s firebase deploy --only hosting`);

0 commit comments

Comments
 (0)