added update time in the readme docs

This commit is contained in:
2024-10-12 19:13:39 +02:00
parent c581bef9f9
commit e2279c0ecb
3 changed files with 18 additions and 7 deletions
+14 -6
View File
@@ -35,17 +35,25 @@ jobs:
run: git clone --single-branch --branch $branch https://github.com/$username/$repo run: git clone --single-branch --branch $branch https://github.com/$username/$repo
- name: ls - name: ls
run: ls run: ls
- name: Replace string in file - name: Replace strings in file
run: | run: |
import os import os
with open("./spearhead/config.lua", "r") as luaFile: import datetime
luaConfig = luaFile.read()
with open("./spearhead/_docs/Reference.md") as f:
newText=f.read().replace("##!config!##", luaConfig)
with open("./spearhead/_docs/Reference.md", "w") as f: def replace(fileName, search, replace):
with open(fileName) as f:
newText=f.read().replace(search, replace)
with open(fileName, "w") as f:
f.write(newText) f.write(newText)
with open("./spearhead/config.lua", "r") as luaFile:
luaConfig = luaFile.read()
replace("./spearhead/_docs/Reference.md", "##!config!##", luaConfig)
lastUpdateTime = datetime.datetime.now().isoformat()
replace("./spearhead/_docs/Reference.md", "##!lastupdatetime!##", lastUpdateTime)
replace("./spearhead/_docs/GetStarted.md", "##!lastupdatetime!##", lastUpdateTime)
shell: python shell: python
- name: mkdir - name: mkdir
+1
View File
@@ -1,6 +1,7 @@
# Spearhead # Spearhead
> **_Spearhead last updated at:_** ##!lastupdatetime!##
## Get Started ## Get Started
+2
View File
@@ -1,6 +1,8 @@
# Spearhead Reference # Spearhead Reference
> **_Spearhead last updated at:_** ##!lastupdatetime!##
## For the Story tellers ## For the Story tellers
Spearhead. A framework created for the mission maker. <br/> Spearhead. A framework created for the mission maker. <br/>