Skip to content

Commit

Permalink
[ssu] Add major/minor release in repoVariables. JB#61468
Browse files Browse the repository at this point in the history
Allows using %(releaseMinor) in repo URLs in order to have repository
independent of the "bugfix" releases.
  • Loading branch information
keto committed Mar 12, 2024
1 parent 49ef9f8 commit 11104a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libssu/ssurepomanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ QStringList SsuRepoManager::repoVariables(QHash<QString, QString> *storageHash,
SsuCoreConfig *settings = SsuCoreConfig::instance();
QStringList configSections;
SsuSettings repoSettings(SSU_REPO_CONFIGURATION, SSU_REPO_CONFIGURATION_DIR);
QString release = settings->release(rnd);

// fill in all arbitrary repo specific variables from ssu.ini
var.variableSection(settings, "repository-url-variables", storageHash);
Expand Down Expand Up @@ -406,7 +407,9 @@ QStringList SsuRepoManager::repoVariables(QHash<QString, QString> *storageHash,
configSections << "release" << "all";
}

storageHash->insert("release", settings->release(rnd));
storageHash->insert("release", release);
storageHash->insert("releaseMajor", release.section('.', 0, 0));
storageHash->insert("releaseMinor", release.section('.', 0, 1));

if (!storageHash->contains("debugSplit"))
storageHash->insert("debugSplit", "packages");
Expand Down

0 comments on commit 11104a5

Please sign in to comment.