Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7427357bc5 | |||
| 6b63d54eb8 | |||
| a3df782245 |
+22
-20
@@ -22,36 +22,31 @@ jobs:
|
|||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git fetch --tags || true
|
git fetch --tags --force
|
||||||
|
|
||||||
# Determine last tag and log range
|
if LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null); then
|
||||||
if git describe --tags --abbrev=0 >/dev/null 2>&1; then
|
|
||||||
LAST_TAG=$(git describe --tags --abbrev=0)
|
|
||||||
RANGE="${LAST_TAG}..HEAD"
|
RANGE="${LAST_TAG}..HEAD"
|
||||||
else
|
else
|
||||||
LAST_TAG="v0.1.9"
|
LAST_TAG="v0.1.9"
|
||||||
RANGE="HEAD"
|
RANGE="HEAD"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Calculate next version
|
|
||||||
IFS='.' read -r major minor patch <<< "${LAST_TAG#v}"
|
IFS='.' read -r major minor patch <<< "${LAST_TAG#v}"
|
||||||
NEW_VERSION="$major.$minor.$((patch + 1))"
|
NEW_VERSION="$major.$minor.$((patch + 1))"
|
||||||
NEW_TAG="v$NEW_VERSION"
|
|
||||||
|
|
||||||
# Log commits
|
|
||||||
CHANGELOG=$(git log $RANGE --oneline | sed 's/^/* /')
|
CHANGELOG=$(git log $RANGE --oneline | sed 's/^/* /')
|
||||||
[ -z "$CHANGELOG" ] && CHANGELOG="Maintenance build."
|
if [ -z "$CHANGELOG" ]; then
|
||||||
|
CHANGELOG="Re-run of version $NEW_VERSION or maintenance build."
|
||||||
|
fi
|
||||||
|
|
||||||
# Tag and push back to Gitea
|
|
||||||
git tag $NEW_TAG
|
|
||||||
git push origin $NEW_TAG
|
|
||||||
|
|
||||||
# Set outputs for next steps
|
|
||||||
echo "version-string=$NEW_VERSION" >> $GITHUB_OUTPUT
|
echo "version-string=$NEW_VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
echo "new-tag=v$NEW_VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "## What's Changed" >> $GITHUB_OUTPUT
|
{
|
||||||
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
echo "changelog<<EOF"
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "## What's Changed"
|
||||||
|
echo "$CHANGELOG"
|
||||||
|
echo "EOF"
|
||||||
|
} >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Setup Tools Cache
|
- name: Setup Tools Cache
|
||||||
id: tools-cache
|
id: tools-cache
|
||||||
@@ -124,11 +119,18 @@ jobs:
|
|||||||
name: unlocker-build
|
name: unlocker-build
|
||||||
path: unlocker.zip
|
path: unlocker.zip
|
||||||
|
|
||||||
|
- name: Finalize Version and Push Tag
|
||||||
|
if: ${{ github.event_name == 'push' && success() }}
|
||||||
|
run: |
|
||||||
|
git tag ${{ steps.calculate-version.outputs.new-tag }}
|
||||||
|
git push origin ${{ steps.calculate-version.outputs.new-tag }}
|
||||||
|
|
||||||
- name: Create Gitea Release
|
- name: Create Gitea Release
|
||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' && success() }}
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
files: unlocker.zip
|
files: unlocker.zip
|
||||||
tag_name: v${{ steps.calculate-version.outputs.version-string }}
|
tag_name: ${{ steps.calculate-version.outputs.new-tag }}
|
||||||
name: Release v${{ steps.calculate-version.outputs.version-string }}
|
name: Release ${{ steps.calculate-version.outputs.new-tag }}
|
||||||
body: ${{ steps.calculate-version.outputs.changelog }}
|
body: ${{ steps.calculate-version.outputs.changelog }}
|
||||||
|
|
||||||
@@ -109,10 +109,11 @@ bool Spoofer::parseCatalog(std::string data)
|
|||||||
auto extractIds = [&](const std::string& key, std::unordered_set<std::string>& targetSet) {
|
auto extractIds = [&](const std::string& key, std::unordered_set<std::string>& targetSet) {
|
||||||
if (catalogData.contains(key) && catalogData[key].contains("items"))
|
if (catalogData.contains(key) && catalogData[key].contains("items"))
|
||||||
for (const auto& id : catalogData[key]["items"])
|
for (const auto& id : catalogData[key]["items"])
|
||||||
if (id.is_string())
|
{
|
||||||
targetSet.insert(id.get<std::string>());
|
if (id.is_string()) targetSet.insert(id.get<std::string>());
|
||||||
else
|
}
|
||||||
Log::warning("Catalog missing or invalid category: {}", key);
|
else
|
||||||
|
Log::warning("Catalog missing or invalid category: {}", key);
|
||||||
};
|
};
|
||||||
|
|
||||||
extractIds("item", _catalogItemIds);
|
extractIds("item", _catalogItemIds);
|
||||||
@@ -142,10 +143,11 @@ bool Spoofer::parseStackable(std::string data, std::unordered_set<std::string>&
|
|||||||
auto populate = [&](const std::string& key, std::unordered_set<std::string>& targetSet) {
|
auto populate = [&](const std::string& key, std::unordered_set<std::string>& targetSet) {
|
||||||
if (doc.contains(key) && doc[key].is_array())
|
if (doc.contains(key) && doc[key].is_array())
|
||||||
for (const auto& item : doc[key])
|
for (const auto& item : doc[key])
|
||||||
if (item.is_string())
|
{
|
||||||
targetSet.insert(item.get<std::string>());
|
if (item.is_string()) targetSet.insert(item.get<std::string>());
|
||||||
else
|
}
|
||||||
Log::warning("Missing stackables array ({})", key);
|
else
|
||||||
|
Log::warning("Missing stackables array ({})", key);
|
||||||
};
|
};
|
||||||
|
|
||||||
populate("Slashers", slasherSet);
|
populate("Slashers", slasherSet);
|
||||||
@@ -271,7 +273,7 @@ void Spoofer::modifyCharacterData(json& js)
|
|||||||
/*
|
/*
|
||||||
ghost node hotfix (untested)
|
ghost node hotfix (untested)
|
||||||
*/
|
*/
|
||||||
/* if (js.contains("bloodWebData") && js["bloodWebData"].contains("ringData"))
|
/* if (js.contains("bloodWebData") && js["bloodWebData"].contains("ringData"))
|
||||||
{
|
{
|
||||||
auto& ringData = js["bloodWebData"]["ringData"];
|
auto& ringData = js["bloodWebData"]["ringData"];
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#include "utils.h"
|
||||||
|
|
||||||
|
#include <minwindef.h>
|
||||||
|
#include <libloaderapi.h>
|
||||||
|
|
||||||
|
std::string utils::getExePath()
|
||||||
|
{
|
||||||
|
char buffer[MAX_PATH];
|
||||||
|
GetModuleFileNameA(NULL, buffer, MAX_PATH);
|
||||||
|
std::string path(buffer);
|
||||||
|
size_t pos = path.find_last_of("\\/");
|
||||||
|
if (pos != std::string::npos) return path.substr(0, pos + 1);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace utils
|
||||||
|
{
|
||||||
|
std::string getExePath();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user