Skip to content

Commit

Permalink
Merge pull request #1041 from nextcloud/build/dist-names-in-beta
Browse files Browse the repository at this point in the history
build: include non-stable channel in dist name
  • Loading branch information
ShGKme authored Jan 21, 2025
2 parents df5d66f + 48773b9 commit 780e388
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ const YEAR = new Date().getFullYear()
* @param {'darwin'|'linux'|'win32'} platform - Distribution target platform
* @param {'arm64'|'universal'|'x64'} arch - Distribution target architecture
* @param {string} ext - File extension
* @param {boolean} includeVersion - Include the version in the name
* @return {string} The distribution name, e.g., Nextcloud.Talk-v1.0.0-macos-x64.dmg
* @example Nextcloud.Talk-macos-universal.dmg
* @example Nextcloud.Talk-linux-x64.flatpak
* @example Nextcloud.Talk-windows-x64.exe
* @example Nextcloud.Talk-beta-windows-x64.exe
*/
function generateDistName(platform, arch, ext, includeVersion = false) {
function generateDistName(platform, arch, ext) {
// Map technical platform name to user-friendly
const platformTitles = {
darwin: 'macos',
Expand All @@ -56,10 +56,10 @@ function generateDistName(platform, arch, ext, includeVersion = false) {
}
const platformTitle = platformTitles[platform] ?? platform
const archTitle = archTitles[arch] ?? arch
const version = packageJSON.version
return includeVersion
? `${CONFIG.applicationNameSanitized}-v${version}-${platformTitle}-${archTitle}${ext}`
: `${CONFIG.applicationNameSanitized}-${platformTitle}-${archTitle}${ext}`
const CHANNEL = process.env.CHANNEL ?? 'stable'
const channel = CHANNEL !== 'stable' ? CHANNEL : ''

return [CONFIG.applicationNameSanitized, channel, platformTitle, archTitle].filter(Boolean).join('-') + ext
}

/**
Expand Down

0 comments on commit 780e388

Please sign in to comment.