Skip to content

Commit dfea907

Browse files
committed
Updated Floppy Diskette Image creation steps to use libfaketime.
1 parent d284cb8 commit dfea907

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/LuaWatcom.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,29 +124,31 @@ jobs:
124124
125125
- name: Create 160k 16-bit DOS Floppy Diskette Image
126126
run: |
127+
export FAKETIME=$(TZ=UTC0 git show --quiet --date='format-local:%Y-%m-%d %H:%M:%S' --format="%cd")
128+
export LD_PRELOAD=$(dpkg -L libfaketime | grep libfaketime.so.1)
127129
label="LUA DOS"
128-
serial="0x$(echo "$label$(git log -1 --format=%ct)" | sha256sum | cut -c1-8)"
129-
date=$(git log -1 --format=%cd --date=format:'%Y-%m-%d %H:%M:%S')
130+
serial="0x$(echo "$label$FAKETIME" | sha256sum | cut -c1-8)"
130131
files=$(find dist/bin/LUA16.EXE demo/core/*.LUA | sort | xargs)
131-
echo "Date: $date"
132+
echo "Faketime: $FAKETIME"
132133
echo "Files: $files"
133134
echo "Label: $label"
134135
echo "Serial: $serial"
135-
faketime -f "$date" mformat -C -i dist/Lua160k.ima -v "$label" -f 160 -N $serial
136-
faketime -f "$date" mcopy -mi dist/Lua160k.ima $files ::
136+
mformat -C -i dist/Lua160k.ima -v "$label" -f 160 -N $serial
137+
mcopy -mi dist/Lua160k.ima $files ::
137138
138139
- name: Create 1.4M Multi-Platform Floppy Diskette Image
139140
run: |
141+
export FAKETIME=$(TZ=UTC0 git show --quiet --date='format-local:%Y-%m-%d %H:%M:%S' --format="%cd")
142+
export LD_PRELOAD=$(dpkg -L libfaketime | grep libfaketime.so.1)
140143
label="LUA MULTIOS"
141-
serial="0x$(echo "$label$(git log -1 --format=%ct)" | sha256sum | cut -c1-8)"
142-
date=$(git log -1 --format=%cd --date=format:'%Y-%m-%d %H:%M:%S')
144+
serial="0x$(echo "$label$FAKETIME" | sha256sum | cut -c1-8)"
143145
files=$(find dist/bin/*.EXE demo/core/*.LUA demo/xtra/*.LUA | sort | xargs)
144-
echo "Date: $date"
146+
echo "Faketime: $FAKETIME"
145147
echo "Files: $files"
146148
echo "Label: $label"
147149
echo "Serial: $serial"
148-
faketime -f "$date" mformat -C -i dist/LuaMulti.ima -v "$label" -f 1440 -N $serial
149-
faketime -f "$date" mcopy -mi dist/LuaMulti.ima $files ::
150+
mformat -C -i dist/LuaMulti.ima -v "$label" -f 1440 -N $serial
151+
mcopy -mi dist/LuaMulti.ima $files ::
150152
151153
- name: Create Floppy Disk Images Zip
152154
run: |

0 commit comments

Comments
 (0)