Skip to content

Commit 9d680b5

Browse files
copy web content to be served on selenium.dev (#10637)
Co-authored-by: Puja Jagani <puja.jagani93@gmail.com>
1 parent dab928e commit 9d680b5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

‎generate_web_code.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
# copy website to build
4+
mkdir build/web
5+
cp -R common/src/web build/web
6+
7+
# switch to gh-pages and copy the files
8+
git checkout gh-pages || exit
9+
# make sure that our local version is up to date.
10+
git pull || exit
11+
12+
rm -rf web
13+
mv build/web web
14+
15+
git add -A web
16+
17+
read -p "Do you want to commit the changes? (Y/n):" changes </dev/tty
18+
19+
if [ -z $changes ]; then
20+
changes=Y
21+
fi
22+
23+
case "$changes" in
24+
Y | y) echo "" ;;
25+
N | n) exit ;;
26+
*) exit ;;
27+
esac
28+
29+
echo "Committing changes"
30+
git commit -am "updating test website code"
31+
32+
echo "pushing to origin gh-pages"
33+
git push origin gh-pages
34+
35+
echo "switching back to trunk branch"
36+
git checkout trunk

0 commit comments

Comments
 (0)