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,7 +22,7 @@ jobs:
pwd pwd
export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1 export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1
./install.sh ./install.sh
git checkout $rev test `git rev-parse HEAD` = "$rev"
- name: antigen build - name: antigen build
shell: /bin/zsh -ileo PIPE_FAIL {0} shell: /bin/zsh -ileo PIPE_FAIL {0}
@ -53,7 +53,7 @@ jobs:
pwd pwd
export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1 export DFS_NO_COMPILE=1 DFS_NO_UPDATE=1
./install.sh ./install.sh
git checkout $rev test `git rev-parse HEAD` = "$rev"
- name: antigen build - name: antigen build
shell: /bin/zsh -ileo PIPE_FAIL {0} shell: /bin/zsh -ileo PIPE_FAIL {0}

View File

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

View File

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