Fix publish more.
This commit is contained in:
@ -268,7 +268,7 @@ rule forth_test
|
|||||||
|
|
||||||
rule publish
|
rule publish
|
||||||
description = PUBLISH $pubpath
|
description = PUBLISH $pubpath
|
||||||
command = $src/tools/publish.py --src $in --dst $pubpath \
|
command = $src/tools/publish.py --src $in --dst "$pubpath" \
|
||||||
-DVERSION=$VERSION \
|
-DVERSION=$VERSION \
|
||||||
-DSTABLE_VERSION=$STABLE_VERSION \
|
-DSTABLE_VERSION=$STABLE_VERSION \
|
||||||
-DOLD_STABLE_VERSION=$OLD_STABLE_VERSION \
|
-DOLD_STABLE_VERSION=$OLD_STABLE_VERSION \
|
||||||
|
|||||||
22
site/BUILD
22
site/BUILD
@ -59,48 +59,48 @@ Alias('publish', ' '.join([
|
|||||||
Publish('publish-esp32-rev',
|
Publish('publish-esp32-rev',
|
||||||
'$dst/esp32/ESP32forth.zip',
|
'$dst/esp32/ESP32forth.zip',
|
||||||
'ESP32forth-{{VERSION}}-{{REVSHORT}}.zip'),
|
'ESP32forth-{{VERSION}}-{{REVSHORT}}.zip'),
|
||||||
Shortcut('publish-esp32-ver',
|
Publish('publish-esp32-ver',
|
||||||
'$dst/esp32/ESP32forth.zip',
|
'$dst/esp32/ESP32forth.zip',
|
||||||
'ESP32forth-{{VERSION}}.zip'),
|
'ESP32forth-{{VERSION}}.zip'),
|
||||||
])),
|
])),
|
||||||
Alias('publish-pico-ice', ' '.join([
|
Alias('publish-pico-ice', ' '.join([
|
||||||
Shortcut('publish-pico-ice-rev',
|
Publish('publish-pico-ice-rev',
|
||||||
'$dst/pico-ice/ueforth-pico-ice.zip',
|
'$dst/pico-ice/ueforth-pico-ice.zip',
|
||||||
'ueforth-pico-ice-{{VERSION}}-{{REVSHORT}}.zip'),
|
'ueforth-pico-ice-{{VERSION}}-{{REVSHORT}}.zip'),
|
||||||
Shortcut('publish-pico-ice-ver',
|
Publish('publish-pico-ice-ver',
|
||||||
'$dst/pico-ice/ueforth-pico-ice.zip',
|
'$dst/pico-ice/ueforth-pico-ice.zip',
|
||||||
'ueforth-pico-ice-{{VERSION}}.zip'),
|
'ueforth-pico-ice-{{VERSION}}.zip'),
|
||||||
])),
|
])),
|
||||||
Alias('publish-linux', ' '.join([
|
Alias('publish-linux', ' '.join([
|
||||||
Shortcut('publish-linux-rev',
|
Publish('publish-linux-rev',
|
||||||
'$dst/posix/ueforth',
|
'$dst/posix/ueforth',
|
||||||
'ueforth-{{VERSION}}-{{REVSHORT}}.linux'),
|
'ueforth-{{VERSION}}-{{REVSHORT}}.linux'),
|
||||||
Shortcut('publish-linux-ver',
|
Publish('publish-linux-ver',
|
||||||
'$dst/posix/ueforth',
|
'$dst/posix/ueforth',
|
||||||
'ueforth-{{VERSION}}.linux'),
|
'ueforth-{{VERSION}}.linux'),
|
||||||
])),
|
])),
|
||||||
Alias('publish-web', ' '.join([
|
Alias('publish-web', ' '.join([
|
||||||
Shortcut('publish-web-rev',
|
Publish('publish-web-rev',
|
||||||
'$dst/web/ueforth.js',
|
'$dst/web/ueforth.js',
|
||||||
'ueforth-{{VERSION}}-{{REVSHORT}}.js'),
|
'ueforth-{{VERSION}}-{{REVSHORT}}.js'),
|
||||||
Shortcut('publish-web-ver',
|
Publish('publish-web-ver',
|
||||||
'$dst/web/ueforth.js',
|
'$dst/web/ueforth.js',
|
||||||
'ueforth-{{VERSION}}.js'),
|
'ueforth-{{VERSION}}.js'),
|
||||||
])),
|
])),
|
||||||
Alias('publish-win', ' '.join([
|
Alias('publish-win', ' '.join([
|
||||||
Alias('publish-win32', ' '.join([
|
Alias('publish-win32', ' '.join([
|
||||||
Shortcut('publish-win32-rev',
|
Publish('publish-win32-rev',
|
||||||
'$dst/windows/uEf32.exe',
|
'$dst/windows/uEf32.exe',
|
||||||
'uEf32-{{VERSION}}-{{REVSHORT}}.exe'),
|
'uEf32-{{VERSION}}-{{REVSHORT}}.exe'),
|
||||||
Shortcut('publish-win32-ver',
|
Publish('publish-win32-ver',
|
||||||
'$dst/windows/uEf32.exe',
|
'$dst/windows/uEf32.exe',
|
||||||
'uEf32-{{VERSION}}.exe'),
|
'uEf32-{{VERSION}}.exe'),
|
||||||
])),
|
])),
|
||||||
Alias('publish-win64', ' '.join([
|
Alias('publish-win64', ' '.join([
|
||||||
Shortcut('publish-win64-rev',
|
Publish('publish-win64-rev',
|
||||||
'$dst/windows/uEf64.exe',
|
'$dst/windows/uEf64.exe',
|
||||||
'uEf64-{{VERSION}}-{{REVSHORT}}.exe'),
|
'uEf64-{{VERSION}}-{{REVSHORT}}.exe'),
|
||||||
Shortcut('publish-win64-ver',
|
Publish('publish-win64-ver',
|
||||||
'$dst/windows/uEf64.exe',
|
'$dst/windows/uEf64.exe',
|
||||||
'uEf64-{{VERSION}}.exe'),
|
'uEf64-{{VERSION}}.exe'),
|
||||||
])),
|
])),
|
||||||
|
|||||||
@ -28,6 +28,8 @@ parser.add_argument('--dst', required=True)
|
|||||||
parser.add_argument('-D', action='append')
|
parser.add_argument('-D', action='append')
|
||||||
parser.add_argument('-F', action='append')
|
parser.add_argument('-F', action='append')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
replacements = args.D or []
|
||||||
|
file_replacements = args.F or []
|
||||||
|
|
||||||
dst = args.dst
|
dst = args.dst
|
||||||
for r in replacements:
|
for r in replacements:
|
||||||
@ -35,7 +37,6 @@ for r in replacements:
|
|||||||
dst = dst.replace('{{' + name + '}}', value)
|
dst = dst.replace('{{' + name + '}}', value)
|
||||||
for r in file_replacements:
|
for r in file_replacements:
|
||||||
name, filename = r.split('=', 1)
|
name, filename = r.split('=', 1)
|
||||||
imported.add(os.path.abspath(filename))
|
dst = dst.replace('{{' + name + '}}', open(filename).read())
|
||||||
line = line.replace('{{' + name + '}}', open(filename).read())
|
|
||||||
|
|
||||||
subprocess.run(f'{GSUTIL_CP} {args.src} {args.dst}', shell=True, check=True)
|
subprocess.run(f'{GSUTIL_CP} {args.src} {ARCHIVE}/{dst}', shell=True, check=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user