Skip to content

Commit

Permalink
fix(update): Add version library and update references (#75)
Browse files Browse the repository at this point in the history
* fix(update): Download from Github `main/src`

Points the autoupdate function to pull from the raw XML source on the main branch.

* fix(update): Disable overwriting generic_mapper

When discMapper updates, we don't want it to mess with any existing generic_mapper.xml -- although no one should be running both scripts simultaneously in one profile because to do so would certainly bring about eschaton!

* fix(update): Designate module path

The versionless module filename will be inside the release package.

* fix(update): Uninstall package before update

* fix(update): Announce successful autoupdates

* fix(update): Set path to local file update

* feat: Advance to v0.4.0-beta

Update the internal script versioning

* chore: Ignore Prettier config

* feat(update): Create version library

Add the version library for comparisons

* feat(update): Update `download_path` help

* feat(update): Verify module to be updated

* Revert "feat: Advance to v0.4.0-beta"

This reverts commit 7ddb5ad.

* feat(update): Set internal version

Local version number for comparison to remote version library.
  • Loading branch information
iLPdev authored Jul 12, 2020
1 parent e2c4c33 commit 80a93a0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ $RECYCLE.BIN/
.vscode/
.vscode/*
*.code-workspace
.prettierrc

### VisualStudioCode Patch ###
# Ignore all local history of files
Expand Down
11 changes: 5 additions & 6 deletions src/discMapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -734,9 +734,8 @@ end</script>
<Script isActive="yes" isFolder="no">
<name>discMapper</name>
<packageName></packageName>
<script>-- discMapper v0.2.1-beta
-- forked from Jor'Mox's Generic Map Script 11/07/2018 version dated 10/20/2019 in Mudlet/src
local version = "2.0.16" -- Generic Map Script version
<script>-- discMapper
local version = "0.2.1-beta"

-- look into options for non-standard door usage for speedwalk
-- come up with aliases to set translations and custom exits, add appropriate help info
Expand Down Expand Up @@ -1231,8 +1230,8 @@ map.help.config = [[
"simple", "normal", or "complex".

&lt;green&gt;download_path&lt;reset&gt; - This is the path that updates are downloaded from.
This may be any web address where the versions.lua and
generic_mapper.xml files can be downloaded from.
This may be any web address from which the versions.lua and
discMapper.xml files can be downloaded.

&lt;green&gt;prompt_test_patterns&lt;reset&gt; - This is a table of default patterns checked
when using the "find prompt" command. The patterns in this table
Expand Down Expand Up @@ -3100,7 +3099,7 @@ function map.eventHandler(event, ...)
map.echo("Map File Loaded.")
elseif string.ends(file,"/versions.lua") then
check_version()
elseif string.ends(file,"/generic_mapper.xml") then
elseif string.ends(file,"/discMapper.xml") then
update_version()
end
elseif event == "sysLoadEvent" or event == "sysInstall" then
Expand Down
6 changes: 6 additions & 0 deletions src/versions.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
{
[1] = [[0.2.0-beta]],
[2] = [[0.2.1-beta]]
}
}

0 comments on commit 80a93a0

Please sign in to comment.