From b7abc97c06f4f40dc08b97f88b903b124b0b7d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xenxo=20Espasand=C3=ADn?= Date: Thu, 15 Jun 2023 00:02:48 +0200 Subject: [PATCH] fix(build): branch name (#131) --- .github/workflows/build.yml | 2 +- premake5.lua | 6 +++++- src/tool/main.cpp | 3 +-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e349dc0d..7f50b0d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,7 +176,7 @@ jobs: name: Deploy Release runs-on: ubuntu-latest needs: [ build-win, build-mac, build-lin ] - if: startsWith(github.ref, 'refs/tags/') && github.event.base_ref == 'refs/heads/prod' + if: startsWith(github.ref, 'refs/tags/') && (github.event.base_ref == 'refs/heads/prod' || github.event.base_ref == 'refs/heads/dev') steps: - name: Check out files uses: actions/checkout@v3 diff --git a/premake5.lua b/premake5.lua index bed1213f..3f6ddeeb 100644 --- a/premake5.lua +++ b/premake5.lua @@ -53,7 +53,11 @@ function generate_version() proc3:close() local split = version_split(version, revision) - local verstr = split[1] .. "." .. split[2] .. "." .. split[3] .. "." .. split[4] .. "-" .. branch + local verstr = split[1] .. "." .. split[2] .. "." .. split[3] .. "." .. split[4] + + if branch ~= "" then + verstr = verstr .. "-" .. branch + end local file = assert(io.open("include/xsk/version.hpp", "w")) file:write("// Generated by premake - do not edit\n\n") diff --git a/src/tool/main.cpp b/src/tool/main.cpp index a6052e05..fa9163b2 100644 --- a/src/tool/main.cpp +++ b/src/tool/main.cpp @@ -1015,12 +1015,11 @@ auto print_usage() -> void std::cout << "\t* game: iw5, iw6, iw7, iw8, iw9, s1, s2, s4, h1, h2, t6, t7, t8, t9\n"; std::cout << "\t* system: pc, ps3, ps4, ps5, xb2 (360), xb3 (One), xb4 (Series X|S), wiiu\n"; std::cout << "\t* path: file or directory (recursive)\n"; - std::cin.get(); } auto branding() -> void { - std::cout << fmt::format("\nGSC Tool {} created by xensik\n\n", XSK_VERSION_STR); + std::cout << fmt::format("GSC Tool {} created by xensik\n\n", XSK_VERSION_STR); } auto main(u32 argc, char** argv) -> void