We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6e8452 commit ad98c84Copy full SHA for ad98c84
1 file changed
VERSION
@@ -1,30 +1 @@
1
-const fileData = items[0].json;
2
-
3
-const base64 = fileData.content.content; // base64 encoded version string
4
-const currentVersion = Buffer.from(base64, 'base64').toString('utf-8').trim();
5
6
-// Parse version
7
-let [major, minor] = currentVersion.split('.').map(Number);
8
9
-// Bump logic: 1.0 → 1.1 … 1.9 → 1.10 → 2.0
10
-if (minor < 10) {
11
- minor += 1;
12
-} else {
13
- major += 1;
14
- minor = 0;
15
-}
16
17
-const newVersion = `${major}.${minor}`;
18
-const encoded = Buffer.from(newVersion).toString('base64');
19
20
-// Output payload for GitHub Update File node
21
-return [
22
- {
23
- json: {
24
- path: fileData.content.path,
25
- content: encoded,
26
- message: `Bump version to ${newVersion}`,
27
- sha: fileData.content.sha,
28
- },
29
30
-];
+1.0
0 commit comments