mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-07-01 04:20:30 +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
|
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}
|
||||||
run: |
|
run: |
|
||||||
echo $SHELL
|
echo $SHELL
|
||||||
antigen list
|
antigen list
|
||||||
|
|
||||||
- name: run tests
|
- name: run tests
|
||||||
shell: /bin/zsh -ileo PIPE_FAIL {0}
|
shell: /bin/zsh -ileo PIPE_FAIL {0}
|
||||||
run: source tools/test.zsh
|
run: source tools/test.zsh
|
||||||
@ -43,24 +43,24 @@ jobs:
|
|||||||
brew update
|
brew update
|
||||||
brew install git python3 zsh curl
|
brew install git python3 zsh curl
|
||||||
sudo pip3 install requests
|
sudo pip3 install requests
|
||||||
|
|
||||||
- name: checkout repo
|
- name: checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: install dfs
|
- name: install dfs
|
||||||
run: |
|
run: |
|
||||||
rev=`git rev-parse HEAD`
|
rev=`git rev-parse HEAD`
|
||||||
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}
|
||||||
run: |
|
run: |
|
||||||
echo $SHELL
|
echo $SHELL
|
||||||
antigen list
|
antigen list
|
||||||
|
|
||||||
- name: run tests
|
- name: run tests
|
||||||
shell: /bin/zsh -ileo PIPE_FAIL {0}
|
shell: /bin/zsh -ileo PIPE_FAIL {0}
|
||||||
run: source tools/test.zsh
|
run: source tools/test.zsh
|
@ -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)
|
||||||
|
@ -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`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user