Skip to content

Commit

Permalink
Automatic TGS DMAPI Update (#6611)
Browse files Browse the repository at this point in the history
This pull request updates the TGS DMAPI to the latest version. Please
note any breaking or unimplemented changes before merging.

Co-authored-by: tgstation-server <[email protected]>
  • Loading branch information
cm13-github and tgstation-server authored Jul 4, 2024
1 parent 3429322 commit 82c081a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions code/modules/tgs/core/tgs_version.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
var/list/version_bits = splittext(deprefixed_parameter, ".")

suite = text2num(version_bits[1])
if(length(version_bits) > 1)
if(version_bits.len > 1)
minor = text2num(version_bits[2])
if(length(version_bits) > 2)
if(version_bits.len > 2)
patch = text2num(version_bits[3])
if(length(version_bits) == 4)
if(version_bits.len == 4)
deprecated_patch = text2num(version_bits[4])

/datum/tgs_version/proc/Valid(allow_wildcards = FALSE)
Expand Down
12 changes: 6 additions & 6 deletions code/modules/tgs/v3210/api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@
instance_name = "TG Station Server" //maybe just upgraded

var/list/logs = TGS_FILE2LIST(".git/logs/HEAD")
if(length(logs))
logs = splittext(logs[length(logs)], " ")
if (length(logs) >= 2)
if(logs.len)
logs = splittext(logs[logs.len], " ")
if (logs.len >= 2)
commit = logs[2]
else
TGS_ERROR_LOG("Error parsing commit logs")

logs = TGS_FILE2LIST(".git/logs/refs/remotes/origin/master")
if(length(logs))
logs = splittext(logs[length(logs)], " ")
if (length(logs) >= 2)
if(logs.len)
logs = splittext(logs[logs.len], " ")
if (logs.len >= 2)
originmastercommit = logs[2]
else
TGS_ERROR_LOG("Error parsing origin commmit logs")
Expand Down

0 comments on commit 82c081a

Please sign in to comment.