Skip to content

Commit 2c5c972

Browse files
committed
cleanup
1 parent e5e6fc2 commit 2c5c972

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/branch-snap.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
uses: actions/setup-node@v4
2323
with:
2424
node-version: '18.x'
25+
- name: Install dependencies
26+
run: npm ci
2527
- name: Update version.json
2628
run: npx gulp incrementVersionJson
2729
- name: Create version.json update PR

tasks/snapTasks.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ import * as fs from 'fs';
88
import * as path from 'path';
99

1010
gulp.task('incrementVersionJson', async (): Promise<void> => {
11-
let versionFilePath = path.join(path.resolve(__dirname, '..'), 'version.json');
12-
let file = fs.readFileSync(versionFilePath, 'utf8');
13-
let versionJson = JSON.parse(file);
11+
const versionFilePath = path.join(path.resolve(__dirname, '..'), 'version.json');
12+
const file = fs.readFileSync(versionFilePath, 'utf8');
13+
const versionJson = JSON.parse(file);
1414

15-
let version = versionJson.version as string;
16-
let split = version.split('.');
17-
let newVersion = `${split[0]}.${parseInt(split[1]) + 1}`;
15+
const version = versionJson.version as string;
16+
const split = version.split('.');
17+
const newVersion = `${split[0]}.${parseInt(split[1]) + 1}`;
1818

1919
console.log(`Updating ${version} to ${newVersion}`);
2020

2121
versionJson.version = newVersion;
22-
let newJson = JSON.stringify(versionJson, null, 4);
22+
const newJson = JSON.stringify(versionJson, null, 4);
2323
console.log(`New json: ${newJson}`);
2424

2525
fs.writeFileSync(versionFilePath, newJson);
26-
});
26+
});

0 commit comments

Comments
 (0)