Skip to content

Commit

Permalink
ci(all): sed date
Browse files Browse the repository at this point in the history
  • Loading branch information
NewFuture committed Apr 20, 2019
1 parent bd28048 commit 7e14cba
Show file tree
Hide file tree
Showing 3 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/\${SYSTEM_PIPELINESTARTTIME}/$(date)/" run.py
- sed -i -e "s/\${BUILD_SOURCEBRANCHNAME}/${TRAVIS_BRANCH}/" -e "s/\${BUILD_DATE}/$(date)/" run.py
- pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
- ./dist/ddns || test -e "config.json"

Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
- script: pip install pyinstaller
name: 'pyinstaller'

- bash: envsubst < run.py > run.py
name: replaceBuild
- bash: sed -i -e "s/\${BUILD_SOURCEBRANCHNAME}/${BUILD_SOURCEBRANCHNAME}/" -e "s/\${BUILD_DATE}/$(date)/" run.py
name: 'replaceBuild'

- script: pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
name: 'build'
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
- script: pip install pyinstaller
name: 'pyinstaller'

- bash: sed -i.temp -e "s/\${BUILD_SOURCEBRANCHNAME}/${BUILD_SOURCEBRANCHNAME}/" -e "s/\${SYSTEM_PIPELINESTARTTIME}/$(date)/" run.py
- bash: sed -i.temp -e "s/\${BUILD_SOURCEBRANCHNAME}/${BUILD_SOURCEBRANCHNAME}/" -e "s/\${BUILD_DATE}/$(date)/" run.py
name: 'replaceBuild'

- script: pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
Expand Down
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
__version__ = "python@none-build"

if getattr(sys, 'frozen', False):
__version__ = "${BUILD_SOURCEBRANCHNAME}@${SYSTEM_PIPELINESTARTTIME}"
__version__ = "${BUILD_SOURCEBRANCHNAME}@${BUILD_DATE}"
if os.name != 'nt':
# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OpenSSL-Certificate
os.environ['SSL_CERT_FILE'] = os.path.join(sys._MEIPASS, 'lib', 'cert.pem')
Expand Down

0 comments on commit 7e14cba

Please sign in to comment.