File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55tmp /
66cache /
77output /
8+ baseline /
9+ nikola-baseline-build /
810/tags
11+ v3. * .zip. *
912
1013# GitHub token
1114.pypt /gh-token
Original file line number Diff line number Diff line change @@ -116,6 +116,17 @@ def main(args=None):
116116 else :
117117 needs_config_file = False
118118
119+ invariant = False
120+
121+ if len (args ) > 0 and args [0 ] == 'build' and '--invariant' in args :
122+ try :
123+ import freezegun
124+ freeze = freezegun .freeze_time ("2038-01-01" )
125+ freeze .start ()
126+ invariant = True
127+ except ImportError :
128+ req_missing (['freezegun' ], 'perform invariant builds' )
129+
119130 sys .path .insert (0 , os .path .dirname (conf_filename ))
120131 try :
121132 spec = importlib .util .spec_from_file_location ("conf" , conf_filename )
@@ -138,17 +149,6 @@ def main(args=None):
138149 if conf_filename_changed :
139150 LOGGER .info ("Using config file '{0}'" .format (conf_filename ))
140151
141- invariant = False
142-
143- if len (args ) > 0 and args [0 ] == 'build' and '--invariant' in args :
144- try :
145- import freezegun
146- freeze = freezegun .freeze_time ("2038-01-01" )
147- freeze .start ()
148- invariant = True
149- except ImportError :
150- req_missing (['freezegun' ], 'perform invariant builds' )
151-
152152 if config :
153153 if os .path .isdir ('plugins' ) and not os .path .exists ('plugins/__init__.py' ):
154154 with open ('plugins/__init__.py' , 'w' ) as fh :
Original file line number Diff line number Diff line change 11#! /bin/bash
2+
3+ set -e -o pipefail -x
4+
25PYVER=$( scripts/getpyver.py short)
36if [[ " $1 " == " check" ]]; then
47 echo -e " \033[36m>> Downloading baseline for $PYVER ...\033[0m"
@@ -19,8 +22,7 @@ rm "pages/creating-a-theme.rst" "pages/extending.rst" "pages/internals.rst" "pag
1922LC_ALL=' en_US.UTF-8' PYTHONHASHSEED=0 nikola build --invariant
2023if [[ " $1 " == " check" ]]; then
2124 echo -e " \033[36m>> Testing baseline...\033[0m"
22- diff -ubwr ../baseline output
23- if [[ $? == 0 ]]; then
25+ if diff -ubwr ../baseline output; then
2426 echo -e " \033[32;1m>> Baseline test successful\033[0m"
2527 else
2628 CODE=$?
You can’t perform that action at this time.
0 commit comments