summaryrefslogtreecommitdiff
path: root/src/SMAPI.ModBuildConfig
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.ModBuildConfig')
-rw-r--r--src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs20
-rw-r--r--src/SMAPI.ModBuildConfig/package.nuspec3
2 files changed, 18 insertions, 5 deletions
diff --git a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs
index 10c55d4c..64262dc2 100644
--- a/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs
+++ b/src/SMAPI.ModBuildConfig/Framework/ModFileManager.cs
@@ -67,15 +67,19 @@ namespace StardewModdingAPI.ModBuildConfig.Framework
string relativeDirPath = file.Directory.FullName.Replace(buildFolder.FullName, "");
// prefer project manifest/i18n files
- if (hasProjectManifest && relativePath.Equals(this.ManifestFileName, StringComparison.InvariantCultureIgnoreCase))
+ if (hasProjectManifest && this.EqualsInvariant(relativePath, this.ManifestFileName))
continue;
- if (hasProjectTranslations && relativeDirPath.Equals("i18n", StringComparison.InvariantCultureIgnoreCase))
+ if (hasProjectTranslations && this.EqualsInvariant(relativeDirPath, "i18n"))
continue;
// ignore release zips
- if (file.Extension.Equals(".zip", StringComparison.InvariantCultureIgnoreCase))
+ if (this.EqualsInvariant(file.Extension, ".zip"))
continue;
-
+
+ // ignore Json.NET (bundled into SMAPI)
+ if (this.EqualsInvariant(file.Name, "Newtonsoft.Json.dll") || this.EqualsInvariant(file.Name, "Newtonsoft.Json.xml"))
+ continue;
+
// add file
this.Files[relativePath] = file;
}
@@ -158,5 +162,13 @@ namespace StardewModdingAPI.ModBuildConfig.Framework
IDictionary<string, object> data = (IDictionary<string, object>)new JavaScriptSerializer().DeserializeObject(json);
return MakeCaseInsensitive(data);
}
+
+ /// <summary>Get whether a string is equal to another case-insensitively.</summary>
+ /// <param name="str">The string value.</param>
+ /// <param name="other">The string to compare with.</param>
+ private bool EqualsInvariant(string str, string other)
+ {
+ return str.Equals(other, StringComparison.InvariantCultureIgnoreCase);
+ }
}
}
diff --git a/src/SMAPI.ModBuildConfig/package.nuspec b/src/SMAPI.ModBuildConfig/package.nuspec
index 4242489e..3ab5db8e 100644
--- a/src/SMAPI.ModBuildConfig/package.nuspec
+++ b/src/SMAPI.ModBuildConfig/package.nuspec
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Pathoschild.Stardew.ModBuildConfig</id>
- <version>2.0-alpha</version>
+ <version>2.0-beta</version>
<title>Build package for SMAPI mods</title>
<authors>Pathoschild</authors>
<owners>Pathoschild</owners>
@@ -14,6 +14,7 @@
<releaseNotes>
- Added: mods are now copied into the `Mods` folder automatically (configurable).
- Added: release zips are now created automatically in your build output folder (configurable).
+ - Added: mod deploy and release zips now exclude Json.NET automatically, since it's provided by SMAPI.
- Added mod's version to release zip filename.
- Improved errors to simplify troubleshooting.
- Fixed release zip not having a mod folder.