Skip to content

Commit

Permalink
Fix non-string template substitutions
Browse files Browse the repository at this point in the history
  • Loading branch information
psiberx committed Apr 6, 2024
1 parent 76c4088 commit 1451d3d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/App/Project.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ constexpr auto Author = "psiberx";
constexpr auto NameW = L"TweakXL";
constexpr auto AuthorW = L"psiberx";

constexpr auto Version = semver::from_string_noexcept("1.8.2").value();
constexpr auto Version = semver::from_string_noexcept("1.8.3").value();
}
11 changes: 11 additions & 0 deletions src/App/Tweaks/Declarative/Yaml/YamlReader.Template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ void FormatNode(const YAML::Node& aNode, const InstanceData& aData)
const auto markPos = value.find(AttrMark);
if (markPos != std::string::npos)
{
if (markPos == 0)
{
const auto attr = MakeKey(value.data() + 2, value.size() - 3);
const auto it = aData.find(attr);
if (it != aData.end())
{
const_cast<YAML::Node&>(aNode) = it.value().node;
return;
}
}

auto node = YAML::Node(FormatString(value, aData));
node.SetTag(aNode.Tag());

Expand Down
8 changes: 4 additions & 4 deletions src/App/Version.rc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#define VER_PRODUCTVERSION 1,8,2,0
#define VER_FILEVERSION 1,8,2,2404042341
#define VER_PRODUCTVERSION 1,8,3,0
#define VER_FILEVERSION 1,8,3,2404061953

#define VER_PRODUCTNAME_STR "TweakXL\0"
#define VER_PRODUCTVERSION_STR "1.8.2\0"
#define VER_FILEVERSION_STR "1.8.2.2404042341\0"
#define VER_PRODUCTVERSION_STR "1.8.3\0"
#define VER_FILEVERSION_STR "1.8.3.2404061953\0"

1 VERSIONINFO
FILEVERSION VER_FILEVERSION
Expand Down
2 changes: 1 addition & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set_xmakever("2.5.9")

set_project("TweakXL")
set_version("1.8.2", {build = "%y%m%d%H%M"})
set_version("1.8.3", {build = "%y%m%d%H%M"})

set_arch("x64")
set_languages("cxx2a")
Expand Down

0 comments on commit 1451d3d

Please sign in to comment.