Skip to content

Commit ed28042

Browse files
committed
chore: make ops scripts platform-independent
1 parent 0cb87e9 commit ed28042

6 files changed

+386
-409
lines changed

ops/postBundle.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const fs = require('fs');
2+
3+
fs.mkdirSync('dist/lib', { recursive: true });
4+
fs.copyFileSync('web/flowed.js', 'dist/lib/flowed.js');

ops/updateSonarProps.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const fs = require('fs');
2+
3+
console.log('Updating the SonarQube properties...');
4+
5+
// Get new package version
6+
const packageVersion = require('../package.json').version;
7+
console.log(`Version: ${packageVersion}`);
8+
9+
// Read old Sonar config
10+
const sonarFile = 'sonar-project.properties';
11+
console.log(`Sonar file: ${sonarFile}`);
12+
const sonarConfig = fs.readFileSync(sonarFile, 'utf-8');
13+
14+
// Write new Sonar config
15+
const newSonarCofig = sonarConfig.replace(/sonar.projectVersion=.*/, `sonar.projectVersion=${packageVersion}`);
16+
fs.writeFileSync(sonarFile, newSonarCofig);

ops/updateSonarProps.sh

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)