Skip to content

Commit

Permalink
Fix duplicates in gh-pages scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Sep 3, 2024
1 parent efeca3f commit 640ee5a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions scripts/update_gh-pages_demo
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ current_version=$(cat VERSION)

if ! [ "$current_branch" == "stable" ]; then
echo "ERROR: Updating the gh-pages demo is only possible from the \"stable\" branch"
exit 1;
exit 1
fi

# Generate demo
npm run demo:min

if [ -n "$(git status --porcelain doc)" ]; then
echo "ERROR: Please commit your modifications to \"stable\""
exit 1;
exit 1
fi

tmpFontsDir=$(mktemp -d)
Expand Down Expand Up @@ -96,7 +96,7 @@ if [ -n "$(git status --porcelain bundle.js worker.js mpd-parser.wasm plus.ico s
echo ""
git status bundle.js worker.js mpd-parser.wasm plus.ico styles fonts assets index.html "versions/$current_version/demo" demo_page_by_version.html

while : ; do
while :; do
echo ""
echo "We will push the demo to gh-pages."
REPLY=""
Expand Down Expand Up @@ -129,7 +129,7 @@ if [ -n "$(git status --porcelain bundle.js worker.js mpd-parser.wasm plus.ico s
exit 0
elif [[ $REPLY =~ ^[Cc](heckout)?$ ]]; then
git checkout bundle.js worker.js mpd-parser.wasm styles fonts assets index.html plus.ico "versions/$current_version/demo" demo_page_by_version.html
elif [[ $REPLY =~ ^([Tt]|([Ss]tash))?$ ]]; then
elif [[ $REPLY =~ ^[Tt]$ ]]; then
git stash -u push bundle.js worker.js mpd-parser.wasm styles fonts assets index.html plus.ico "versions/$current_version/demo" demo_page_by_version.html
break
fi
Expand Down
10 changes: 5 additions & 5 deletions scripts/update_gh-pages_doc
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ current_version=$(cat VERSION)

if ! [ "$current_branch" == "stable" ]; then
echo "ERROR: Updating the gh-pages documentation is only possible from the \"stable\" branch"
exit 1;
exit 1
fi

# Generate documentation
npm run doc

if [ -n "$(git status --porcelain doc)" ]; then
echo "ERROR: Please commit your modifications to \"stable\""
exit 1;
exit 1
fi

tmpDir=$(mktemp -d)
Expand All @@ -53,7 +53,7 @@ rm -rf doc
mv $tmpDir/* "versions/$current_version/doc"
ln -s "./versions/$current_version/doc" doc
mv $tmpDemoList generate_demo_list.mjs
mv $tmpDocList generate_documentation_list.mjs
mv $tmpDocList generate_documentation_list.mjs

node generate_documentation_list.mjs
rm generate_documentation_list.mjs
Expand All @@ -64,7 +64,7 @@ if [ -n "$(git status --porcelain doc "versions/$current_version/doc" documentat
echo ""
git status doc "versions/$current_version/doc" documentation_pages_by_version.html

while : ; do
while :; do
echo ""
echo "We will push the documentation to gh-pages."
REPLY=""
Expand Down Expand Up @@ -97,7 +97,7 @@ if [ -n "$(git status --porcelain doc "versions/$current_version/doc" documentat
exit 0
elif [[ $REPLY =~ ^[Cc](heckout)?$ ]]; then
git checkout doc "versions/$current_version/doc" documentation_pages_by_version.html
elif [[ $REPLY =~ ^([Tt]|([Ss]tash))?$ ]]; then
elif [[ $REPLY =~ ^[Tt]$ ]]; then
git stash -u push doc "versions/$current_version/doc" documentation_pages_by_version.html
break
fi
Expand Down

0 comments on commit 640ee5a

Please sign in to comment.