Fix publish more.

This commit is contained in:
Brad Nelson
2024-01-01 22:15:15 -08:00
parent a6c6b8d25f
commit f70f802a75
3 changed files with 16 additions and 15 deletions

View File

@ -268,7 +268,7 @@ rule forth_test
rule publish
description = PUBLISH $pubpath
command = $src/tools/publish.py --src $in --dst $pubpath \
command = $src/tools/publish.py --src $in --dst "$pubpath" \
-DVERSION=$VERSION \
-DSTABLE_VERSION=$STABLE_VERSION \
-DOLD_STABLE_VERSION=$OLD_STABLE_VERSION \

View File

@ -59,48 +59,48 @@ Alias('publish', ' '.join([
Publish('publish-esp32-rev',
'$dst/esp32/ESP32forth.zip',
'ESP32forth-{{VERSION}}-{{REVSHORT}}.zip'),
Shortcut('publish-esp32-ver',
Publish('publish-esp32-ver',
'$dst/esp32/ESP32forth.zip',
'ESP32forth-{{VERSION}}.zip'),
])),
Alias('publish-pico-ice', ' '.join([
Shortcut('publish-pico-ice-rev',
Publish('publish-pico-ice-rev',
'$dst/pico-ice/ueforth-pico-ice.zip',
'ueforth-pico-ice-{{VERSION}}-{{REVSHORT}}.zip'),
Shortcut('publish-pico-ice-ver',
Publish('publish-pico-ice-ver',
'$dst/pico-ice/ueforth-pico-ice.zip',
'ueforth-pico-ice-{{VERSION}}.zip'),
])),
Alias('publish-linux', ' '.join([
Shortcut('publish-linux-rev',
Publish('publish-linux-rev',
'$dst/posix/ueforth',
'ueforth-{{VERSION}}-{{REVSHORT}}.linux'),
Shortcut('publish-linux-ver',
Publish('publish-linux-ver',
'$dst/posix/ueforth',
'ueforth-{{VERSION}}.linux'),
])),
Alias('publish-web', ' '.join([
Shortcut('publish-web-rev',
Publish('publish-web-rev',
'$dst/web/ueforth.js',
'ueforth-{{VERSION}}-{{REVSHORT}}.js'),
Shortcut('publish-web-ver',
Publish('publish-web-ver',
'$dst/web/ueforth.js',
'ueforth-{{VERSION}}.js'),
])),
Alias('publish-win', ' '.join([
Alias('publish-win32', ' '.join([
Shortcut('publish-win32-rev',
Publish('publish-win32-rev',
'$dst/windows/uEf32.exe',
'uEf32-{{VERSION}}-{{REVSHORT}}.exe'),
Shortcut('publish-win32-ver',
Publish('publish-win32-ver',
'$dst/windows/uEf32.exe',
'uEf32-{{VERSION}}.exe'),
])),
Alias('publish-win64', ' '.join([
Shortcut('publish-win64-rev',
Publish('publish-win64-rev',
'$dst/windows/uEf64.exe',
'uEf64-{{VERSION}}-{{REVSHORT}}.exe'),
Shortcut('publish-win64-ver',
Publish('publish-win64-ver',
'$dst/windows/uEf64.exe',
'uEf64-{{VERSION}}.exe'),
])),

View File

@ -28,6 +28,8 @@ parser.add_argument('--dst', required=True)
parser.add_argument('-D', action='append')
parser.add_argument('-F', action='append')
args = parser.parse_args()
replacements = args.D or []
file_replacements = args.F or []
dst = args.dst
for r in replacements:
@ -35,7 +37,6 @@ for r in replacements:
dst = dst.replace('{{' + name + '}}', value)
for r in file_replacements:
name, filename = r.split('=', 1)
imported.add(os.path.abspath(filename))
line = line.replace('{{' + name + '}}', open(filename).read())
dst = dst.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)