-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38e38e0
commit b0d0744
Showing
2 changed files
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# dir name | ||
dir=$(basename $(dirname $0)) | ||
|
||
# pypi token | ||
pypi_token=$(cat PYPI_TOKEN) | ||
|
||
# 从__init__.py文件中读取版本信息 | ||
version=$(python -c "from src.notion_nlp import __version__; print(__version__)") | ||
version=$(python -c "from src.$dir import __version__; print(__version__)") | ||
|
||
# build & publish | ||
poetry build && \ | ||
poetry publish -u __token__ -p $pypi_token | ||
|
||
# pyinstaller linux exec file | ||
pyinstaller -F src/notion_nlp/__main__.py -n notion-nlp-linux && \ | ||
pyinstaller -F src/$dir/__main__.py -n $dir-linux && \ | ||
|
||
# Compress the executable file | ||
zip ./dist/notion-nlp-linux.zip ./dist/notion-nlp-linux ./scripts/Chinese-simple.sh scripts/English.sh scripts/start.sh | ||
zip ./dist/$dir-linux.zip ./dist/$dir-linux ./scripts/Chinese-simple.sh scripts/English.sh scripts/start.sh | ||
|
||
zip dist/notion-nlp-win64.zip dist/notion-nlp-win64.exe scripts/Chinese-simple.bat scripts/English.bat scripts/start.bat | ||
zip dist/$dir-win64.zip dist/$dir-win64.exe scripts/Chinese-simple.bat scripts/English.bat scripts/start.bat |