Skip to content

Commit

Permalink
ci(tavis): date time
Browse files Browse the repository at this point in the history
  • Loading branch information
NewFuture committed May 2, 2019
1 parent e0b18e0 commit a093cdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install:

# command to run tests
script:
- sed -i -e "s/\${BUILD_SOURCEBRANCHNAME}/${TRAVIS_BRANCH}/" -e "s/\${BUILD_DATE}/$(date)/" run.py
- sed -i -e "s/\${BUILD_SOURCEBRANCHNAME}/${TRAVIS_BRANCH}/" -e "s/\${BUILD_DATE}/$(date --iso-8601=seconds)/" run.py
- pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
- ./dist/ddns || test -e "config.json"

Expand Down
8 changes: 4 additions & 4 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
from util.cache import Cache

__version__ = "${BUILD_SOURCEBRANCHNAME}@${BUILD_DATE}" # CI 时会被Tag替换
__description__ = "自动更新DNS记录指向本地IP [automatically update DNS records to dynamic local IP]"
__description__ = "automatically update DNS records to dynamic local IP [自动更新DNS记录指向本地IP]"
__doc__ = """
ddns[%s]
(i) 文档主页[homepage or docs]: https://ddns.newfuture.cc/
(?) 问题和帮助[issues or bugs]: https://github.com/NewFuture/DDNS/issues
(i) homepage or docs [文档主页]: https://ddns.newfuture.cc/
(?) issues or bugs [问题和帮助]: https://github.com/NewFuture/DDNS/issues
Copyright (c) New Future (MIT License)
""" % (__version__)

Expand Down Expand Up @@ -140,7 +140,7 @@ def main():
epilog=__doc__, formatter_class=RawTextHelpFormatter)
parser.add_argument('--version', action='version', version=__version__)
parser.add_argument(
'-c', '--config', default="config.json", help="配置文件路径[config file]")
'-c', '--config', default="config.json", help="config file [配置文件路径]")
get_config(path=parser.parse_args().config)
# Dynamicly import the dns module as configuration
dns_provider = str(get_config('dns', 'dnspod').lower())
Expand Down

0 comments on commit a093cdb

Please sign in to comment.