-
Notifications
You must be signed in to change notification settings - Fork 16
/
publish.sh
47 lines (44 loc) · 1.1 KB
/
publish.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
# SPDX-License-Identifier: GPL-2.0-only
tmp_publish_dir_name=_youqu_publish_tmp_dir
cd ..
rm -rf ${tmp_publish_dir_name}
mkdir -p ${tmp_publish_dir_name}/youqu/apps/
ls youqu | grep -v apps | grep -v public | grep -v report| grep -v node_modules | xargs -i cp -r youqu/{} ${tmp_publish_dir_name}/youqu/
cp youqu/apps/__init__.py ${tmp_publish_dir_name}/youqu/apps/
ignores=(
.idea
.vscode
.pytest_cache
.reuse
pyproject.toml
publish.sh
deploy.sh
site
docs
README.en.md
CONTRIBUTING.md
LICENSE
RELEASE.md
mkdocs.yml
requirements*.txt
apps/autotest*
Pipfile
Pipfile.lock
ci_result.json
package.json
pnpm-lock.yaml
)
for i in ${ignores[*]}
do
rm -rf rm -rf ${tmp_publish_dir_name}/youqu/${i}
done
cp youqu/pyproject.toml ${tmp_publish_dir_name}/
cp youqu/src/startproject.py ${tmp_publish_dir_name}/youqu/
cd ${tmp_publish_dir_name}/
pip3 install --upgrade pip
pip3 install --upgrade build
pip3 install --upgrade twine
python3 -m build
twine upload dist/*