Skip to content

Commit ac93bd9

Browse files
committed
Make script a bit more robust
1 parent da9aeb6 commit ac93bd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/copy-documentation-for-new-release.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ function copy_source_to(){
3636

3737
# Remove .gitignore'd files from copies
3838
# Otherwise they will remain on the local filesytem
39-
rm -r "$DIR/examples/node_modules"
40-
rm "$DIR/examples/package-lock.json"
39+
rm -rf "$DIR/examples/node_modules"
40+
rm -f "$DIR/examples/package-lock.json"
4141

4242
# replace `release_id: master` with `release_id: $FULL_VERSION` in
4343
# $FILE_PATH
4444
sed -i.bak "s/release_id: master/release_id: $FULL_VERSION/g" "$FILE_PATH"
4545
sed -i.bak "s/sort_id: master/sort_id: $MAJOR_VERSION/g" "$FILE_PATH"
46-
rm "$FILE_PATH.bak"
46+
rm -f "$FILE_PATH.bak"
4747

4848
git add "$DIR"
4949
git add "$FILE_PATH"

0 commit comments

Comments
 (0)