Skip to content

Commit

Permalink
chore: make ops scripts platform-independent
Browse files Browse the repository at this point in the history
  • Loading branch information
danielduarte committed Oct 16, 2022
1 parent 0cb87e9 commit ed28042
Show file tree
Hide file tree
Showing 6 changed files with 386 additions and 409 deletions.
4 changes: 4 additions & 0 deletions ops/postBundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const fs = require('fs');

fs.mkdirSync('dist/lib', { recursive: true });
fs.copyFileSync('web/flowed.js', 'dist/lib/flowed.js');
16 changes: 16 additions & 0 deletions ops/updateSonarProps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const fs = require('fs');

console.log('Updating the SonarQube properties...');

// Get new package version
const packageVersion = require('../package.json').version;
console.log(`Version: ${packageVersion}`);

// Read old Sonar config
const sonarFile = 'sonar-project.properties';
console.log(`Sonar file: ${sonarFile}`);
const sonarConfig = fs.readFileSync(sonarFile, 'utf-8');

// Write new Sonar config
const newSonarCofig = sonarConfig.replace(/sonar.projectVersion=.*/, `sonar.projectVersion=${packageVersion}`);
fs.writeFileSync(sonarFile, newSonarCofig);
40 changes: 0 additions & 40 deletions ops/updateSonarProps.sh

This file was deleted.

Loading

0 comments on commit ed28042

Please sign in to comment.