Skip to content

Commit d1745e4

Browse files
author
Lasim
committed
chore(all): update release-it configuration for gateway service
1 parent 1aab8fa commit d1745e4

File tree

3 files changed

+61
-136
lines changed

3 files changed

+61
-136
lines changed

services/backend/.release-it.js

Lines changed: 16 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,24 @@
11
module.exports = {
2-
"git": {
3-
"commitMessage": "chore(backend): release v${version}",
4-
"tagName": "backend-v${version}",
5-
"tagAnnotation": "Backend Release ${version}",
6-
"addUntrackedFiles": "false"
2+
git: {
3+
commitMessage: 'chore(backend): release v${version}',
4+
tagName: 'backend-v${version}',
5+
requireCleanWorkingDir: false
76
},
8-
"github": {
9-
"release": true,
10-
"releaseName": "Backend v${version}"
7+
npm: {
8+
publish: false
119
},
12-
"npm": {
13-
"publish": false
10+
github: {
11+
release: false
1412
},
15-
"hooks": {
16-
"before:init": ["npm run lint"],
17-
"after:bump": "npm run build",
18-
"after:release": "echo 'Backend ${version} released!'"
19-
},
20-
"plugins": {
21-
"@release-it/conventional-changelog": {
22-
"preset": {
23-
"name": "angular"
13+
plugins: {
14+
'@release-it/conventional-changelog': {
15+
preset: {
16+
name: 'angular'
2417
},
25-
"infile": "CHANGELOG.md",
26-
"ignoreRecommendedBump": true,
27-
"path": "services/backend",
28-
"writerOpts": {
29-
"commitsFilter": ["feat", "fix", "perf", "revert"],
30-
"transform": function(commit, context) {
31-
// Only include commits with backend scope, all scope, or no scope
32-
const scopes = commit.scope ? commit.scope.split(',').map(s => s.trim().toLowerCase()) : [];
33-
34-
// If commit has a scope, it must include 'backend' or 'all'
35-
if (commit.scope && !scopes.includes('backend') && !scopes.includes('all')) {
36-
return; // Filter out commits not related to backend
37-
}
38-
39-
// Create a new commit object to avoid modifying immutable object
40-
const newCommit = Object.assign({}, commit);
41-
42-
// Ensure commit hash is available for link text
43-
if (newCommit.hash) {
44-
newCommit.shortHash = newCommit.hash.substring(0, 7);
45-
}
46-
47-
return newCommit;
48-
},
49-
"commitPartial": "* {{subject}} ([{{shortHash}}](https://github.com/deploystackio/deploystack/commit/{{hash}}))\n"
18+
infile: 'CHANGELOG.md',
19+
ignoreRecommendedBump: true,
20+
gitRawCommitsOpts: {
21+
path: 'services/backend'
5022
}
5123
}
5224
}

services/frontend/.release-it.js

Lines changed: 22 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,31 @@
11
module.exports = {
2-
"git": {
3-
"commitMessage": "chore(frontend): release v${version}",
4-
"tagName": "frontend-v${version}",
5-
"tagAnnotation": "Frontend Release ${version}",
6-
"addUntrackedFiles": "false"
2+
git: {
3+
commitMessage: 'chore(frontend): release v${version}',
4+
tagName: 'frontend-v${version}',
5+
tagAnnotation: 'Frontend Release ${version}',
6+
addUntrackedFiles: false
77
},
8-
"github": {
9-
"release": true,
10-
"releaseName": "Frontend v${version}"
8+
github: {
9+
release: true,
10+
releaseName: 'Frontend v${version}'
1111
},
12-
"npm": {
13-
"publish": false
12+
npm: {
13+
publish: false
1414
},
15-
"hooks": {
16-
"before:init": ["npm run lint"],
17-
// Only run build when NOT in CI mode (i.e., during actual release merge)
18-
// During PR creation (CI=true), skip build to avoid rollup issues
19-
"after:bump": process.env.CI ? [] : ["npm run build"],
20-
"after:release": "echo 'Frontend ${version} released!'"
15+
hooks: {
16+
'before:init': ['npm run lint'],
17+
'after:bump': process.env.CI ? [] : ['npm run build'],
18+
'after:release': 'echo \'Frontend ${version} released!\''
2119
},
22-
"plugins": {
23-
"@release-it/conventional-changelog": {
24-
"preset": {
25-
"name": "angular"
20+
plugins: {
21+
'@release-it/conventional-changelog': {
22+
preset: {
23+
name: 'angular'
2624
},
27-
"infile": "CHANGELOG.md",
28-
"ignoreRecommendedBump": true,
29-
"path": "services/frontend",
30-
"writerOpts": {
31-
"commitsFilter": ["feat", "fix", "perf", "revert"],
32-
"transform": function(commit) {
33-
// Only include commits with frontend scope, all scope, or no scope
34-
const scopes = commit.scope ? commit.scope.split(',').map(s => s.trim().toLowerCase()) : [];
35-
36-
// If commit has a scope, it must include 'frontend' or 'all'
37-
if (commit.scope && !scopes.includes('frontend') && !scopes.includes('all')) {
38-
return; // Filter out commits not related to frontend
39-
}
40-
41-
// Create a new commit object to avoid modifying immutable object
42-
const newCommit = Object.assign({}, commit);
43-
44-
// Ensure commit hash is available for link text
45-
if (newCommit.hash) {
46-
newCommit.shortHash = newCommit.hash.substring(0, 7);
47-
}
48-
49-
return newCommit;
50-
},
51-
"commitPartial": "* {{subject}} ([{{shortHash}}](https://github.com/deploystackio/deploystack/commit/{{hash}}))\n"
25+
infile: 'CHANGELOG.md',
26+
ignoreRecommendedBump: true,
27+
gitRawCommitsOpts: {
28+
path: 'services/frontend'
5229
}
5330
}
5431
}

services/gateway/.release-it.js

Lines changed: 23 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,32 @@
11
module.exports = {
2-
"git": {
3-
"commitMessage": "chore(gateway): release v${version}",
4-
"tagName": "gateway-v${version}",
5-
"tagAnnotation": "Gateway Release ${version}",
6-
"addUntrackedFiles": false,
7-
// Ensure we're working from the correct directory
8-
"requireCleanWorkingDir": false
2+
git: {
3+
commitMessage: 'chore(gateway): release v${version}',
4+
tagName: 'gateway-v${version}',
5+
tagAnnotation: 'Gateway Release ${version}',
6+
addUntrackedFiles: false,
7+
requireCleanWorkingDir: false
98
},
10-
"github": {
11-
"release": true,
12-
"releaseName": "Gateway v${version}"
9+
github: {
10+
release: true,
11+
releaseName: 'Gateway v${version}'
1312
},
14-
"npm": {
15-
"publish": false // We handle npm publishing separately in the workflow
13+
npm: {
14+
publish: false
1615
},
17-
"hooks": {
18-
"before:init": ["npm run lint"],
19-
// Only run build when NOT in CI mode (i.e., during actual release merge)
20-
// During PR creation (CI=true), skip build to avoid rollup issues
21-
"after:bump": process.env.CI ? [] : ["npm run build"],
22-
"after:release": "echo 'Gateway ${version} released!'"
16+
hooks: {
17+
'before:init': ['npm run lint'],
18+
'after:bump': process.env.CI ? [] : ['npm run build'],
19+
'after:release': 'echo \'Gateway ${version} released!\''
2320
},
24-
"plugins": {
25-
"@release-it/conventional-changelog": {
26-
"preset": {
27-
"name": "angular"
21+
plugins: {
22+
'@release-it/conventional-changelog': {
23+
preset: {
24+
name: 'angular'
2825
},
29-
"infile": "CHANGELOG.md",
30-
"ignoreRecommendedBump": true,
31-
"path": "services/gateway",
32-
"writerOpts": {
33-
"commitsFilter": ["feat", "fix", "perf", "revert"],
34-
"transform": function(commit, context) {
35-
// Only include commits with gateway scope, all scope, or no scope
36-
const scopes = commit.scope ? commit.scope.split(',').map(s => s.trim().toLowerCase()) : [];
37-
38-
// If commit has a scope, it must include 'gateway' or 'all'
39-
if (commit.scope && !scopes.includes('gateway') && !scopes.includes('all')) {
40-
return; // Filter out commits not related to gateway
41-
}
42-
43-
// Create a new commit object to avoid modifying immutable object
44-
const newCommit = Object.assign({}, commit);
45-
46-
// Ensure commit hash is available for link text
47-
if (newCommit.hash) {
48-
newCommit.shortHash = newCommit.hash.substring(0, 7);
49-
}
50-
51-
return newCommit;
52-
},
53-
"commitPartial": "* {{subject}} ([{{shortHash}}](https://github.com/deploystackio/deploystack/commit/{{hash}}))\n"
26+
infile: 'CHANGELOG.md',
27+
ignoreRecommendedBump: true,
28+
gitRawCommitsOpts: {
29+
path: 'services/gateway'
5430
}
5531
}
5632
}

0 commit comments

Comments
 (0)