Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share version number among qmake, xmake and shell scripts #233

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Changes from 1 commit
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
Next Next commit
share version number among qmake, xmake and shell scripts
CyanoHao committed Mar 4, 2024
commit 3bcefce8595735e55a0116df6239b9d39c8bc129
4 changes: 1 addition & 3 deletions RedPandaIDE/RedPandaIDE.pro
Original file line number Diff line number Diff line change
@@ -15,9 +15,7 @@ CONFIG += ENABLE_SDCC

APP_NAME = RedPandaCPP

APP_VERSION = 2.27

APP_VERSION_SUFFIX = alpha
include(../version_pri.lua)

# TEST_VERSION = beta2
system(git rev-list HEAD --count): TEST_VERSION = $$system(git rev-list HEAD --count)
8 changes: 6 additions & 2 deletions RedPandaIDE/xmake.lua
Original file line number Diff line number Diff line change
@@ -12,8 +12,12 @@ target("RedPandaIDE")
add_options("app-name", "prefix", "libexecdir")
add_options("lua-addon", "sdcc", "vcs")

if TEST_VERSION ~= nil then
add_defines('REDPANDA_CPP_VERSION="' .. APP_VERSION .. '-' .. TEST_VERSION .. '"')
if APP_VERSION_SUFFIX ~= "" then
add_defines('APP_VERSION_SUFFIX="' .. APP_VERSION_SUFFIX .. '"')
end

if TEST_VERSION ~= "" then
add_defines('REDPANDA_CPP_VERSION="' .. APP_VERSION .. '.' .. TEST_VERSION .. '"')
else
add_defines('REDPANDA_CPP_VERSION="' .. APP_VERSION .. '"')
end
2 changes: 2 additions & 0 deletions version_pri.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
APP_VERSION="2.27"
APP_VERSION_SUFFIX="alpha"
5 changes: 3 additions & 2 deletions xmake.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
APP_VERSION = "2.26"
TEST_VERSION = "alpha8"
includes("./version_pri.lua")

TEST_VERSION = "$(shell git rev-list HEAD --count)"

add_rules("mode.debug", "mode.release")
set_warnings("all", "extra", "pedantic")