This commit is contained in:
Dict Xiong 2022-08-28 20:45:47 +08:00
parent fe29ddf9d7
commit e008d1a388
3 changed files with 11 additions and 12 deletions

View File

@ -22,14 +22,14 @@ jobs:
pwd
export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1
./install.sh
git checkout $rev
test `git rev-parse HEAD` = "$rev"
- name: antigen build
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
echo $SHELL
antigen list
- name: run tests
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: source tools/test.zsh
@ -43,24 +43,24 @@ jobs:
brew update
brew install git python3 zsh curl
sudo pip3 install requests
- name: checkout repo
uses: actions/checkout@v3
- name: install dfs
run: |
rev=`git rev-parse HEAD`
pwd
export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1
./install.sh
git checkout $rev
test `git rev-parse HEAD` = "$rev"
- name: antigen build
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
echo $SHELL
antigen list
- name: run tests
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: source tools/test.zsh

View File

@ -7,7 +7,7 @@ logging.basicConfig(level=logging.INFO, format="[%(filename)s:%(lineno)d][%(leve
try:
import requests
except ImportError:
logging.fatal("Please install requests module")
logging.critical("Please install requests module")
exit(1)
@ -57,17 +57,17 @@ if __name__ == "__main__":
content=content.strip()
if not content:
logging.error("empty log content")
exit(1)
exit(0)
resp = post_log(url, hostname, uuid, content)
if resp.status_code == 200:
logging.info("200 ok")
exit(0)
elif resp.status_code == 403:
logging.warning("403 forbidden")
logging.error("403 forbidden")
logging.info("you may need to register your hostname and uuid")
logging.info(f"hostname: {hostname}, uuid: {uuid}")
exit(0)
else:
logging.error("unknown error ")
logging.critical("unknown error ")
logging.error(f"{resp.status_code}: {resp.text}")
exit(1)

View File

@ -24,5 +24,4 @@ alias p114 > /dev/null
# check update
dfs update
dfs version
test `git rev-parse HEAD` = `curl -fsSL https://api.beardic.cn/get-var/dfs-commit-id`