Skip to content

Commit d97f08f

Browse files
committed
create file if it does not exist
1 parent e1feb34 commit d97f08f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.gitpod.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,19 @@ tasks:
99
fi
1010
1111
# disable Gradle auto-reload in IntelliJ
12-
cat .idea/workspace.xml
13-
xmlstarlet ed --inplace -u '//option[@name="autoReloadType"]/@value' -v 'NONE' .idea/workspace.xml
12+
if [ -f ".idea/workspace.xml" ]; then
13+
xmlstarlet ed --inplace -u '//option[@name="autoReloadType"]/@value' -v 'NONE' .idea/workspace.xml
14+
else
15+
mkdir -p .idea
16+
cat > .idea/workspace.xml <<EOL
17+
<?xml version="1.0" encoding="UTF-8"?>
18+
<project version="4">
19+
<component name="AutoImportSettings">
20+
<option name="autoReloadType" value="SELECTIVE" />
21+
</component>
22+
</project>
23+
EOL
24+
fi
1425
1526
# run standard gradle build
1627
./gradlew localDistro

0 commit comments

Comments
 (0)