Skip to content

Commit 7f16cec

Browse files
committed
Enable updates to same major version
1 parent 0dd4d93 commit 7f16cec

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
33
cd "$SCRIPT_DIR/.."
44

5+
#exit on error
6+
set -e
7+
58
if [[ $# != 1 ]]; then
69
echo "Usage: $0 <commitish>"
710
exit 1
@@ -17,14 +20,12 @@ function copy_source_to(){
1720
local FILE_PATH="${DIR}.md"
1821

1922
if [ -e "$DIR" ]; then
20-
echo "$DIR already exists, cannot continue"
21-
exit 1
23+
echo "$DIR already exists, removing it for update"
24+
rm -r "$DIR"
2225
fi
2326

24-
if [ -e "$FILE_PATH" ]
25-
then
26-
echo "$FILE_PATH already exists, cannot continue"
27-
exit 1
27+
if [ -e "$FILE_PATH" ]; then
28+
rm -r "$FILE_PATH"
2829
fi
2930

3031
echo "Copy $SOURCE_PATH to $DIR"

0 commit comments

Comments
 (0)