pass STABLE_BUILD instead of BUILD_BRANCH through cmake

This commit is contained in:
Stephen Birarda 2018-05-09 18:26:35 -07:00
parent 50baccdb63
commit c3595a3216
6 changed files with 33 additions and 29 deletions

View file

@ -22,7 +22,7 @@ android {
'-DHIFI_ANDROID_PRECOMPILED=' + HIFI_ANDROID_PRECOMPILED, '-DHIFI_ANDROID_PRECOMPILED=' + HIFI_ANDROID_PRECOMPILED,
'-DRELEASE_NUMBER=' + RELEASE_NUMBER, '-DRELEASE_NUMBER=' + RELEASE_NUMBER,
'-DRELEASE_TYPE=' + RELEASE_TYPE, '-DRELEASE_TYPE=' + RELEASE_TYPE,
'-DBUILD_BRANCH=' + BUILD_BRANCH, '-DSTABLE_BUILD=' + STABLE_BUILD,
'-DDISABLE_QML=OFF', '-DDISABLE_QML=OFF',
'-DDISABLE_KTX_CACHE=OFF' '-DDISABLE_KTX_CACHE=OFF'
} }
@ -116,4 +116,3 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
} }

View file

@ -37,7 +37,7 @@ task clean(type: Delete) {
ext { ext {
RELEASE_NUMBER = project.hasProperty('RELEASE_NUMBER') ? project.getProperty('RELEASE_NUMBER') : '0' RELEASE_NUMBER = project.hasProperty('RELEASE_NUMBER') ? project.getProperty('RELEASE_NUMBER') : '0'
RELEASE_TYPE = project.hasProperty('RELEASE_TYPE') ? project.getProperty('RELEASE_TYPE') : 'DEV' RELEASE_TYPE = project.hasProperty('RELEASE_TYPE') ? project.getProperty('RELEASE_TYPE') : 'DEV'
BUILD_BRANCH = project.hasProperty('BUILD_BRANCH') ? project.getProperty('BUILD_BRANCH') : '' STABLE_BUILD = project.hasProperty('STABLE_BUILD') ? project.getProperty('STABLE_BUILD') : '0'
EXEC_SUFFIX = Os.isFamily(Os.FAMILY_WINDOWS) ? '.exe' : '' EXEC_SUFFIX = Os.isFamily(Os.FAMILY_WINDOWS) ? '.exe' : ''
QT5_DEPS = [ QT5_DEPS = [
'Qt5Concurrent', 'Qt5Concurrent',
@ -536,7 +536,7 @@ task cleanDependencies(type: Delete) {
// FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution. // FIXME this code is prototyping the desired functionality for doing build time binary dependency resolution.
// See the comment on the qtBundle task above // See the comment on the qtBundle task above
/* /*
// FIXME derive the path from the gradle environment // FIXME derive the path from the gradle environment

View file

@ -20,11 +20,8 @@ macro(SET_PACKAGING_PARAMETERS)
set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV") set_from_env(RELEASE_TYPE RELEASE_TYPE "DEV")
set_from_env(RELEASE_NUMBER RELEASE_NUMBER "") set_from_env(RELEASE_NUMBER RELEASE_NUMBER "")
set_from_env(BUILD_BRANCH BRANCH "") set_from_env(STABLE_BUILD STABLE_BUILD 0)
string(TOLOWER "${BUILD_BRANCH}" BUILD_BRANCH)
message(STATUS "The BUILD_BRANCH variable is: ${BUILD_BRANCH}")
message(STATUS "The BRANCH environment variable is: $ENV{BRANCH}")
message(STATUS "The RELEASE_TYPE variable is: ${RELEASE_TYPE}") message(STATUS "The RELEASE_TYPE variable is: ${RELEASE_TYPE}")
# setup component categories for installer # setup component categories for installer
@ -56,8 +53,8 @@ macro(SET_PACKAGING_PARAMETERS)
# if the build is a PRODUCTION_BUILD from the "stable" branch # if the build is a PRODUCTION_BUILD from the "stable" branch
# then use the STABLE gobal services # then use the STABLE gobal services
if (BUILD_BRANCH STREQUAL "stable") if (STABLE_BUILD)
message(STATUS "The RELEASE_TYPE is PRODUCTION and the BUILD_BRANCH is stable...") message(STATUS "The RELEASE_TYPE is PRODUCTION and STABLE_BUILD is 1")
set(BUILD_GLOBAL_SERVICES "STABLE") set(BUILD_GLOBAL_SERVICES "STABLE")
set(USE_STABLE_GLOBAL_SERVICES 1) set(USE_STABLE_GLOBAL_SERVICES 1)
else () else ()
@ -87,6 +84,14 @@ macro(SET_PACKAGING_PARAMETERS)
endif () endif ()
string(TIMESTAMP BUILD_TIME "%d/%m/%Y") string(TIMESTAMP BUILD_TIME "%d/%m/%Y")
# if STABLE_BUILD is 1, PRODUCTION_BUILD must be 1 and
# DEV_BUILD and PR_BUILD must be 0
if (STABLE_BUILD)
if (NOT PRODUCTION_BUILD OR PR_BUILD OR DEV_BUILD)
message(FATAL_ERROR "Cannot produce STABLE_BUILD without PRODUCTION_BUILD")
endif ()
endif ()
if (DEPLOY_PACKAGE) if (DEPLOY_PACKAGE)
# for deployed packages always grab the serverless content # for deployed packages always grab the serverless content

View file

@ -24,7 +24,7 @@ namespace BuildInfo {
const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@"; const QString MODIFIED_ORGANIZATION = "@BUILD_ORGANIZATION@";
const QString ORGANIZATION_DOMAIN = "highfidelity.io"; const QString ORGANIZATION_DOMAIN = "highfidelity.io";
const QString VERSION = "@BUILD_VERSION@"; const QString VERSION = "@BUILD_VERSION@";
const QString BUILD_BRANCH = "@BUILD_BRANCH@"; const QString STABLE_BUILD = "@STABLE_BUILD@";
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@"; const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
const QString BUILD_TIME = "@BUILD_TIME@"; const QString BUILD_TIME = "@BUILD_TIME@";
} }

View file

@ -177,7 +177,7 @@ DomainServer::DomainServer(int argc, char* argv[]) :
qDebug() << "[VERSION] Build sequence:" << qPrintable(applicationVersion()); qDebug() << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
qDebug() << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION; qDebug() << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
qDebug() << "[VERSION] VERSION:" << BuildInfo::VERSION; qDebug() << "[VERSION] VERSION:" << BuildInfo::VERSION;
qDebug() << "[VERSION] BUILD_BRANCH:" << BuildInfo::BUILD_BRANCH; qDebug() << "[VERSION] STABLE_BUILD:" << BuildInfo::STABLE_BUILD;
qDebug() << "[VERSION] BUILD_GLOBAL_SERVICES:" << BuildInfo::BUILD_GLOBAL_SERVICES; qDebug() << "[VERSION] BUILD_GLOBAL_SERVICES:" << BuildInfo::BUILD_GLOBAL_SERVICES;
qDebug() << "[VERSION] We will be using this name to find ICE servers:" << _iceServerAddr; qDebug() << "[VERSION] We will be using this name to find ICE servers:" << _iceServerAddr;
@ -1114,7 +1114,7 @@ void DomainServer::handleConnectedNode(SharedNodePointer newNode) {
} }
void DomainServer::sendDomainListToNode(const SharedNodePointer& node, const HifiSockAddr &senderSockAddr) { void DomainServer::sendDomainListToNode(const SharedNodePointer& node, const HifiSockAddr &senderSockAddr) {
const int NUM_DOMAIN_LIST_EXTENDED_HEADER_BYTES = NUM_BYTES_RFC4122_UUID + NLPacket::NUM_BYTES_LOCALID + const int NUM_DOMAIN_LIST_EXTENDED_HEADER_BYTES = NUM_BYTES_RFC4122_UUID + NLPacket::NUM_BYTES_LOCALID +
NUM_BYTES_RFC4122_UUID + NLPacket::NUM_BYTES_LOCALID + 4; NUM_BYTES_RFC4122_UUID + NLPacket::NUM_BYTES_LOCALID + 4;
// setup the extended header for the domain list packets // setup the extended header for the domain list packets
@ -2676,7 +2676,7 @@ bool DomainServer::isAuthenticatedRequest(HTTPConnection* connection, const QUrl
QString settingsPassword = settingsPasswordVariant.isValid() ? settingsPasswordVariant.toString() : ""; QString settingsPassword = settingsPasswordVariant.isValid() ? settingsPasswordVariant.toString() : "";
QString hexHeaderPassword = headerPassword.isEmpty() ? QString hexHeaderPassword = headerPassword.isEmpty() ?
"" : QCryptographicHash::hash(headerPassword.toUtf8(), QCryptographicHash::Sha256).toHex(); "" : QCryptographicHash::hash(headerPassword.toUtf8(), QCryptographicHash::Sha256).toHex();
if (settingsUsername == headerUsername && hexHeaderPassword == settingsPassword) { if (settingsUsername == headerUsername && hexHeaderPassword == settingsPassword) {
return true; return true;
} }

View file

@ -693,8 +693,8 @@ private:
}; };
/**jsdoc /**jsdoc
* <p>The <code>Controller.Hardware.Application</code> object has properties representing Interface's state. The property * <p>The <code>Controller.Hardware.Application</code> object has properties representing Interface's state. The property
* values are integer IDs, uniquely identifying each output. <em>Read-only.</em> These can be mapped to actions or functions or * values are integer IDs, uniquely identifying each output. <em>Read-only.</em> These can be mapped to actions or functions or
* <code>Controller.Standard</code> items in a {@link RouteObject} mapping (e.g., using the {@link RouteObject#when} method). * <code>Controller.Standard</code> items in a {@link RouteObject} mapping (e.g., using the {@link RouteObject#when} method).
* Each data value is either <code>1.0</code> for "true" or <code>0.0</code> for "false".</p> * Each data value is either <code>1.0</code> for "true" or <code>0.0</code> for "false".</p>
* <table> * <table>
@ -776,7 +776,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset"; static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset";
bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET); bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET);
// Ignore any previous crashes if running from command line with a test script. // Ignore any previous crashes if running from command line with a test script.
bool inTestMode { false }; bool inTestMode { false };
for (int i = 0; i < argc; ++i) { for (int i = 0; i < argc; ++i) {
QString parameter(argv[i]); QString parameter(argv[i]);
@ -1112,7 +1112,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion()); qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION; qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
qCDebug(interfaceapp) << "[VERSION] VERSION:" << BuildInfo::VERSION; qCDebug(interfaceapp) << "[VERSION] VERSION:" << BuildInfo::VERSION;
qCDebug(interfaceapp) << "[VERSION] BUILD_BRANCH:" << BuildInfo::BUILD_BRANCH; qCDebug(interfaceapp) << "[VERSION] STABLE_BUILD:" << BuildInfo::STABLE_BUILD;
qCDebug(interfaceapp) << "[VERSION] BUILD_GLOBAL_SERVICES:" << BuildInfo::BUILD_GLOBAL_SERVICES; qCDebug(interfaceapp) << "[VERSION] BUILD_GLOBAL_SERVICES:" << BuildInfo::BUILD_GLOBAL_SERVICES;
#if USE_STABLE_GLOBAL_SERVICES #if USE_STABLE_GLOBAL_SERVICES
qCDebug(interfaceapp) << "[VERSION] We will use STABLE global services."; qCDebug(interfaceapp) << "[VERSION] We will use STABLE global services.";
@ -1369,11 +1369,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
initializeGL(); initializeGL();
qCDebug(interfaceapp, "Initialized GL"); qCDebug(interfaceapp, "Initialized GL");
// Initialize the display plugin architecture // Initialize the display plugin architecture
initializeDisplayPlugins(); initializeDisplayPlugins();
qCDebug(interfaceapp, "Initialized Display"); qCDebug(interfaceapp, "Initialized Display");
// Create the rendering engine. This can be slow on some machines due to lots of // Create the rendering engine. This can be slow on some machines due to lots of
// GPU pipeline creation. // GPU pipeline creation.
initializeRenderEngine(); initializeRenderEngine();
qCDebug(interfaceapp, "Initialized Render Engine."); qCDebug(interfaceapp, "Initialized Render Engine.");
@ -1417,7 +1417,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
// In practice we shouldn't run across installs that don't have a known installer type. // In practice we shouldn't run across installs that don't have a known installer type.
// Client or Client+Server installs should always have the installer.ini next to their // Client or Client+Server installs should always have the installer.ini next to their
// respective interface.exe, and Steam installs will be detected as such. If a user were // respective interface.exe, and Steam installs will be detected as such. If a user were
// to delete the installer.ini, though, and as an example, we won't know the context of the // to delete the installer.ini, though, and as an example, we won't know the context of the
// original install. // original install.
constexpr auto INSTALLER_KEY_TYPE = "type"; constexpr auto INSTALLER_KEY_TYPE = "type";
constexpr auto INSTALLER_KEY_CAMPAIGN = "campaign"; constexpr auto INSTALLER_KEY_CAMPAIGN = "campaign";
@ -2182,7 +2182,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
if (testProperty.isValid()) { if (testProperty.isValid()) {
auto scriptEngines = DependencyManager::get<ScriptEngines>(); auto scriptEngines = DependencyManager::get<ScriptEngines>();
const auto testScript = property(hifi::properties::TEST).toUrl(); const auto testScript = property(hifi::properties::TEST).toUrl();
// Set last parameter to exit interface when the test script finishes, if so requested // Set last parameter to exit interface when the test script finishes, if so requested
scriptEngines->loadScript(testScript, false, false, false, false, quitWhenFinished); scriptEngines->loadScript(testScript, false, false, false, false, quitWhenFinished);
@ -2399,7 +2399,7 @@ void Application::onAboutToQuit() {
} }
} }
// The active display plugin needs to be loaded before the menu system is active, // The active display plugin needs to be loaded before the menu system is active,
// so its persisted explicitly here // so its persisted explicitly here
Setting::Handle<QString>{ ACTIVE_DISPLAY_PLUGIN_SETTING_NAME }.set(getActiveDisplayPlugin()->getName()); Setting::Handle<QString>{ ACTIVE_DISPLAY_PLUGIN_SETTING_NAME }.set(getActiveDisplayPlugin()->getName());
@ -2633,7 +2633,7 @@ void Application::initializeGL() {
// Create the GPU backend // Create the GPU backend
// Requires the window context, because that's what's used in the actual rendering // Requires the window context, because that's what's used in the actual rendering
// and the GPU backend will make things like the VAO which cannot be shared across // and the GPU backend will make things like the VAO which cannot be shared across
// contexts // contexts
_glWidget->makeCurrent(); _glWidget->makeCurrent();
gpu::Context::init<gpu::gl::GLBackend>(); gpu::Context::init<gpu::gl::GLBackend>();
@ -2656,7 +2656,7 @@ void Application::initializeDisplayPlugins() {
auto lastActiveDisplayPluginName = activeDisplayPluginSetting.get(); auto lastActiveDisplayPluginName = activeDisplayPluginSetting.get();
auto defaultDisplayPlugin = displayPlugins.at(0); auto defaultDisplayPlugin = displayPlugins.at(0);
// Once time initialization code // Once time initialization code
DisplayPluginPointer targetDisplayPlugin; DisplayPluginPointer targetDisplayPlugin;
foreach(auto displayPlugin, displayPlugins) { foreach(auto displayPlugin, displayPlugins) {
displayPlugin->setContext(_gpuContext); displayPlugin->setContext(_gpuContext);
@ -2669,7 +2669,7 @@ void Application::initializeDisplayPlugins() {
} }
// The default display plugin needs to be activated first, otherwise the display plugin thread // The default display plugin needs to be activated first, otherwise the display plugin thread
// may be launched by an external plugin, which is bad // may be launched by an external plugin, which is bad
setDisplayPlugin(defaultDisplayPlugin); setDisplayPlugin(defaultDisplayPlugin);
// Now set the desired plugin if it's not the same as the default plugin // Now set the desired plugin if it's not the same as the default plugin
@ -5820,7 +5820,7 @@ void Application::update(float deltaTime) {
viewIsDifferentEnough = true; viewIsDifferentEnough = true;
} }
// if it's been a while since our last query or the view has significantly changed then send a query, otherwise suppress it // if it's been a while since our last query or the view has significantly changed then send a query, otherwise suppress it
static const std::chrono::seconds MIN_PERIOD_BETWEEN_QUERIES { 3 }; static const std::chrono::seconds MIN_PERIOD_BETWEEN_QUERIES { 3 };
auto now = SteadyClock::now(); auto now = SteadyClock::now();
@ -7749,7 +7749,7 @@ void Application::sendLambdaEvent(const std::function<void()>& f) {
} else { } else {
LambdaEvent event(f); LambdaEvent event(f);
QCoreApplication::sendEvent(this, &event); QCoreApplication::sendEvent(this, &event);
} }
} }
void Application::initPlugins(const QStringList& arguments) { void Application::initPlugins(const QStringList& arguments) {
@ -7972,7 +7972,7 @@ void Application::setDisplayPlugin(DisplayPluginPointer newDisplayPlugin) {
} }
// FIXME don't have the application directly set the state of the UI, // FIXME don't have the application directly set the state of the UI,
// instead emit a signal that the display plugin is changing and let // instead emit a signal that the display plugin is changing and let
// the desktop lock itself. Reduces coupling between the UI and display // the desktop lock itself. Reduces coupling between the UI and display
// plugins // plugins
auto offscreenUi = DependencyManager::get<OffscreenUi>(); auto offscreenUi = DependencyManager::get<OffscreenUi>();