Skip to content

Commit b149106

Browse files
try again
1 parent d1b0a65 commit b149106

2 files changed

Lines changed: 6 additions & 17 deletions

File tree

branding.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
"faviconIco": "branding/favicon.ico",
88
"pwaIcon192": "branding/pwa-icon-192.png",
99
"pwaIcon512": "branding/pwa-icon-512.png"
10-
}
10+
}

ci/dev/apply-branding.js

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ const root = path.resolve(__dirname, "../..")
77
const replacements = [
88
{
99
files: ["ci/build/nfpm.yaml"],
10-
from: [
11-
/vendor: "Coder"/g,
12-
/homepage: "https:\/\/github.com\/coder\/code-server"/g,
13-
/maintainer: ".*"/g,
14-
],
10+
from: [/vendor: "Coder"/g, /homepage: "https:\/\/github.com\/coder\/code-server"/g, /maintainer: ".*"/g],
1511
to: [
1612
`vendor: "${branding.companyName}"`,
1713
`homepage: "https://${branding.companyDomain}"`,
@@ -51,9 +47,7 @@ const replacements = [
5147
},
5248
{
5349
files: ["src/node/routes/index.ts"],
54-
from: [
55-
/new UpdateProvider\("https:\/\/api.github.com\/repos\/coder\/code-server\/releases\/latest", settings\)/g,
56-
],
50+
from: [/new UpdateProvider\("https:\/\/api.github.com\/repos\/coder\/code-server\/releases\/latest", settings\)/g],
5751
to: [
5852
`new UpdateProvider("https://api.github.com/repos/${branding.companyName}/${branding.productName}/releases/latest", settings)`,
5953
],
@@ -69,10 +63,7 @@ const assetReplacements = [
6963
]
7064

7165
// Directories that might contain prebuilt release artifacts we need to patch in-place.
72-
const releaseDirs = [
73-
path.join(root, "release"),
74-
path.join(root, "release-standalone"),
75-
]
66+
const releaseDirs = [path.join(root, "release"), path.join(root, "release-standalone")]
7667

7768
// Helper to safely patch a JSON file by reading, merging, and writing.
7869
function patchJson(file, mutateFn) {
@@ -108,9 +99,7 @@ function applyBrandingToReleaseArtifacts() {
10899
patchJson(productJsonPath, (json) => {
109100
json.shortName = branding.productName
110101
json.longName = branding.productName
111-
json.applicationName = branding.productName
112-
.toLowerCase()
113-
.replace(/[^a-z0-9-]/g, "-")
102+
json.applicationName = branding.productName.toLowerCase().replace(/[^a-z0-9-]/g, "-")
114103
json.dataFolderName = `${branding.productName}-data`
115104
json.urlProtocol = branding.productName.toLowerCase()
116105
json.reportIssueUrl = `https://${branding.companyDomain}/support`
@@ -145,4 +134,4 @@ function applyReplacements() {
145134
console.log("Branding applied successfully.")
146135
}
147136

148-
applyReplacements()
137+
applyReplacements()

0 commit comments

Comments
 (0)