Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ jobs:
include:
- os: windows-latest
vcpkgCommitId: '6f7ffeb18f99796233b958aaaf14ec7bd4fb64b2'
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
new_release_git_tag: ${{ steps.semantic.outputs.new_release_git_tag }}
new_release_notes: ${{ steps.semantic.outputs.new_release_notes }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7
- uses: lukka/get-cmake@latest
- name: Dump the content of $RUNNER_TEMP
run: find $RUNNER_TEMP
Expand All @@ -35,7 +40,7 @@ jobs:
shell: bash

- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch.
Expand All @@ -49,14 +54,14 @@ jobs:
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}'"

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
uses: cycjimmy/semantic-release-action@v6
id: semantic # Need an `id` for output variables
with:
# You can specify specifying version range for the extra plugins if you prefer.
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/github@"https://registry.npmjs.org/@achingbrain/semantic-release-github/-/semantic-release-github-0.0.0.tgz"
@semantic-release/github
@google/semantic-release-replace-plugin
dry_run: false
env:
Expand All @@ -70,37 +75,32 @@ jobs:
buildPreset: Release-MSVC
- name: Upload files to a GitHub release
if: steps.semantic.outputs.new_release_published == 'true'
uses: svenstaro/upload-release-action@2.3.0
uses: svenstaro/upload-release-action@2.11.5
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: build/release-msvc/MergeMapper_${{ steps.semantic.outputs.new_release_version }}.7z
tag: ${{ steps.semantic.outputs.new_release_git_tag }}
overwrite: true
- name: Setup Dotnet
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'
- name: Download NexusUploader
if: steps.semantic.outputs.new_release_published == 'true'
run: dotnet tool install -g NexusUploader
- name: Upload files to Nexus
# https://github.com/agc93/nexus-uploader
if: steps.semantic.outputs.new_release_published == 'true'
env:
UNEX_COOKIES: ${{ secrets.UNEX_COOKIES }}
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
UNEX_GAME: skyrimspecialedition
UNEX_MODID: 74689
UNEX_FILENAME: MergeMapper
UNEX_FILEDESCRIPTION: |-
See Description -> Requirements for installation instructions.
PDB is for crash debugging and can be removed.
UNEX_PREVIOUSFILE: "auto"
file: build/release-msvc/MergeMapper_${{ steps.semantic.outputs.new_release_version }}.7z
version: ${{ steps.semantic.outputs.new_release_version }}
changelog: ${{ steps.semantic.outputs.new_release_notes }}
run: |
unex upload $UNEX_MODID $file -v $version
unex changelog $version "$changelog"

nexus-upload:
needs: job
if: needs.job.outputs.new_release_published == 'true'
uses: alandtse/nexus-workflows/.github/workflows/upload-nexus.yml@main
with:
nexus_game_id: skyrimspecialedition
nexus_mod_id: "74689"
tag_name: ${{ needs.job.outputs.new_release_git_tag }}
mod_version: ${{ needs.job.outputs.new_release_version }}
mod_filename: MergeMapper
changelog: ${{ needs.job.outputs.new_release_notes }}
file_description: |-
See Description -> Requirements for installation instructions.
PDB is for crash debugging and can be removed.
previous_file: auto
# Idempotent re-runs; safe against duplicate changelog reposts as of
# nexus-workflows v1.5.2 (alandtse/nexus-workflows#8).
check_existing: true
secrets:
UNEX_NEXUSMODS_SESSION_COOKIE: ${{ secrets.UNEX_NEXUSMODS_SESSION_COOKIE }}
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
25 changes: 11 additions & 14 deletions .github/workflows/unex-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Dotnet
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v5
with:
dotnet-version: '3.1.x'
include-prerelease: false
- name: Download NexusUploader
run: dotnet tool install -g NexusUploader
- name: Check Nexus Cookies
# https://github.com/agc93/nexus-uploader
dotnet-version: 8.x.x
- name: Download BUTR.NexusUploader
run: dotnet tool install -g BUTR.NexusUploader
- name: Check Nexus session cookie
# https://github.com/BUTR/BUTR.NexusUploader
env:
UNEX_COOKIES: ${{ secrets.UNEX_COOKIES }}
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
UNEX_SESSION_COOKIE: ${{ secrets.UNEX_NEXUSMODS_SESSION_COOKIE }}
run: |
unex check --cookie
unex check --session-cookie "$UNEX_SESSION_COOKIE"
- name: Check Nexus API Key
# https://github.com/agc93/nexus-uploader
# https://www.nexusmods.com/users/myaccount?tab=api%20access
# https://github.com/BUTR/BUTR.NexusUploader
# https://www.nexusmods.com/users/myaccount?tab=api%20access
env:
UNEX_COOKIES: ${{ secrets.UNEX_COOKIES }}
UNEX_APIKEY: ${{ secrets.UNEX_APIKEY }}
run: |
unex check --key $UNEX_APIKEY
unex check --key "$UNEX_APIKEY"
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
exclude: ^\.vscode/ # VS Code config files are JSONC (allow comments)
- id: check-added-large-files

- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
hooks:
- id: actionlint
# lukka/run-vcpkg's own templates use `${{ runner.workspace }}` (an Azure
# Pipelines-style context carried over as boilerplate); it evaluates to
# empty on GitHub-hosted runners but the resulting relative path still
# resolves correctly in practice (confirmed by real CI runs). Swapping to
# `github.workspace` is not equivalent (one directory level deeper) and
# would change the actual vcpkg cache path, so this is suppressed rather
# than "fixed".
args:
- -ignore
- 'property "workspace" is not defined in object type'
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@
}
]
]
}
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
}
}
]
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion contrib/Distribution/Config/MergeMapper.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
debug:
logLevel: debug
flushLevel: trace
flushLevel: trace
Binary file modified contrib/Distribution/fomod/ModuleConfig.xml
Binary file not shown.
Binary file modified contrib/Distribution/fomod/info.xml
Binary file not shown.
8 changes: 4 additions & 4 deletions src/MergeMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ std::pair<const char*, RE::FormID> MergeMapperInterface001::GetOriginalFormID(co
return std::make_pair(modName, formID);
}

bool MergeMapperPluginAPI::MergeMapperInterface001::isMerge(const char* modName) {
bool MergeMapperPluginAPI::MergeMapperInterface001::isMerge(const char* modName) {
std::string espkey = modName;
toLower(espkey);
return reverseMergeMap.contains(espkey);
}

bool MergeMapperPluginAPI::MergeMapperInterface001::wasMerged(const char* modName) {
bool MergeMapperPluginAPI::MergeMapperInterface001::wasMerged(const char* modName) {
std::string espkey = modName;
toLower(espkey);
return mergeMap.contains(espkey);
Expand Down Expand Up @@ -281,9 +281,9 @@ bool MergeMapperInterface001::CheckForRedundantPlugins() {
for (auto i = 0; i < modCount; i++) {
const auto file = files[i];
plugin = std::string{file->GetFilename()};
oldPlugin = std::string{MergeMapperInterface001::GetNewFormID(plugin.c_str(), 0).first};
oldPlugin = std::string{MergeMapperInterface001::GetNewFormID(plugin.c_str(), 0).first};
logger::debug(fmt::runtime(fileFormat), file->GetCompileIndex(), "", plugin);
result = isRedundant(plugin, oldPlugin) || result;
result = isRedundant(plugin, oldPlugin) || result;
}
for (auto i = 0; i < lightCount; i++) {
const auto file = smallfiles[i];
Expand Down