Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit cd3d82b

Browse files
committed
add a simple deployment script
1 parent 6d90aa8 commit cd3d82b

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ jobs:
2121
git config --global user.email "me@patrickwu.space"
2222
git config --global user.name "Jinming Wu, Patrick"
2323
git clone --depth 1 https://patrick330602:$GH_TOKEN@github.com/wslutilities/website.git website
24-
mkdir -p ./website/wslpy/
25-
if [ ! -d "./website/wslpy/$(python3 setup.py --version)" ] ; then mkdir ./website/wslpy/$(python3 setup.py --version); rm -f ./website/wslpy/current; ln -s ./$(python3 setup.py --version) ./website/wslpy/current; fi
26-
cp -rf ./html/wslpy/* ./website/wslpy/$(python3 setup.py --version)
24+
bash -x scripts/website-update.bash
2725
git --git-dir=./website/.git --work-tree=./website add -A
2826
git --git-dir=./website/.git --work-tree=./website commit -m "wslpy Wiki update at $(date)" || exit 0
2927
git --git-dir=./website/.git --work-tree=./website push

scripts/website-update.bash

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
mkdir -p ./website/wslpy/
2+
wslpy_ver="$(python3 setup.py --version)"
3+
if [ ! -d "./website/wslpy/${wslpy_ver}" ] ; then
4+
mkdir ./website/wslpy/${wslpy_ver}
5+
rm -f ./website/wslpy/current
6+
ln -s ./${wslpy_ver} ./website/wslpy/current
7+
rm -f website/wslpy/dir.txt
8+
echo "<option value=\"\" selected disabled hidden>-</option>" >> website/wslpy/dir.txt
9+
for f in $(ls -d website/wslpy/*/); do
10+
f="$(echo ${f} | sed -e 's\website/\\')"
11+
s_f="$(echo ${f} | sed -e 's\wslpy/\\' -e 's|/||')"
12+
echo -e "<option value=\"${f}\">${s_f}</option>\r" >> website/wslpy/dir.txt
13+
done
14+
fi
15+
cp -rf ./html/wslpy/* ./website/wslpy/${wslpy_ver}

wslpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
[![pypi](https://flat.badgen.net/pypi/v/wslpy)](https://pypi.org/project/wslpy/)
2+
## Documentation for Ver. 0.0.14
33
44
> `wslpy` is far from complete. the API will change frequently.
55

0 commit comments

Comments
 (0)