mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-24 07:36:53 +08:00
debug
This commit is contained in:
parent
fe29ddf9d7
commit
e008d1a388
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -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`
|
||||
|
|
Loading…
Reference in New Issue
Block a user