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
+15 -7
View File
@@ -35,17 +35,25 @@ jobs:
run: git clone --single-branch --branch $branch https://github.com/$username/$repo
- name: ls
run: ls
- name: Replace string in file
- name: Replace strings in file
run: |
import os
import datetime
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)
with open("./spearhead/config.lua", "r") as luaFile:
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:
f.write(newText)
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
- name: mkdir
+1
View File
@@ -1,6 +1,7 @@
# Spearhead
> **_Spearhead last updated at:_** ##!lastupdatetime!##
## Get Started
+2
View File
@@ -1,6 +1,8 @@
# Spearhead Reference
> **_Spearhead last updated at:_** ##!lastupdatetime!##
## For the Story tellers
Spearhead. A framework created for the mission maker. <br/>