Skip to content

Commit 7d4f7cb

Browse files
committed
SonarCloud implementation + Changelog updates
1 parent d2cbf9c commit 7d4f7cb

File tree

9 files changed

+80
-3
lines changed

9 files changed

+80
-3
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
- run:
2727
name: build
2828
command: npm run build
29+
- run:
30+
name: sonarcloud:config
31+
command: npm run sonarcloud:config $SONARCLOUD_TOKEN $CIRCLE_BRANCH
32+
- run:
33+
name: sonarcloud:start
34+
command: npm run sonarcloud:start
2935
- persist_to_workspace:
3036
root: .
3137
paths: .

CHANGELOG.JSON

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
{
22
"versions": [
3+
{
4+
"version": "1.9.0",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [
8+
"Optimize bundle size for latest SPFx version due to Office UI Fabric specific versioning [#136](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/136)"
9+
],
10+
"fixes": [
11+
"`PeoplePicker`: Suggested People not loading after first selection [#134](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/134)"
12+
]
13+
},
14+
"contributions": []
15+
},
316
{
417
"version": "1.8.0",
518
"changes": {

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Releases
22

3+
## 1.9.0
4+
5+
**Enhancements**
6+
7+
- Optimize bundle size for latest SPFx version due to Office UI Fabric specific versioning [#136](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/136)
8+
9+
**Fixes**
10+
11+
- `PeoplePicker`: Suggested People not loading after first selection [#134](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/134)
12+
313
## 1.8.0
414

515
**Enhancements**

docs/documentation/docs/about/release-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Releases
22

3+
## 1.9.0
4+
5+
**Enhancements**
6+
7+
- Optimize bundle size for latest SPFx version due to Office UI Fabric specific versioning [#136](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/136)
8+
9+
**Fixes**
10+
11+
- `PeoplePicker`: Suggested People not loading after first selection [#134](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/134)
12+
313
## 1.8.0
414

515
**Enhancements**

gulpfile.sonarqube.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
var gulp = require('gulp');
2+
var sonarqubeScanner = require('sonarqube-scanner');
3+
4+
gulp.task('sonarqube', function(callback) {
5+
sonarqubeScanner({
6+
serverUrl : "https://sonarcloud.io",
7+
options : {}
8+
}, callback);
9+
});

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"versionUpdater": "gulp versionUpdater",
1414
"karma": "karma start --circle true",
1515
"changelog": "node scripts/create-changelog.js && node scripts/sync-changelogs.js && gulp versionUpdater",
16-
"postinstall": "node postinstall/install.js"
16+
"postinstall": "node postinstall/install.js",
17+
"sonarcloud:config": "node ./scripts/sonarcloud.js",
18+
"sonarcloud:start": "gulp sonarqube --gulpfile gulpfile.sonarqube.js"
1719
},
1820
"dependencies": {
1921
"@pnp/common": "^1.0.1",
@@ -49,7 +51,8 @@
4951
"karma-remap-coverage": "^0.1.4",
5052
"react": "15.4.2",
5153
"react-addons-test-utils": "15.6.0",
52-
"react-dom": "15.4.2"
54+
"react-dom": "15.4.2",
55+
"sonarqube-scanner": "2.1.1"
5356
},
5457
"repository": {
5558
"type": "git",

scripts/sonarcloud.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const fs = require("fs");
2+
const path = require("path");
3+
4+
const params = process.argv;
5+
let token = "";
6+
let branchName = "";
7+
if (params && params.length > 0) {
8+
branchName = params.pop();
9+
token = params.pop();
10+
}
11+
12+
const package = fs.readFileSync(path.join(__dirname, "../package.json"), "UTF8");
13+
let sonarProps = fs.readFileSync(path.join(__dirname, "../sonar-project.properties"), "UTF8");
14+
if (package && sonarProps) {
15+
const pkg = JSON.parse(package);
16+
sonarProps += `sonar.login=${token}\n`;
17+
sonarProps += `sonar.projectVersion=${pkg.version}\n`;
18+
sonarProps += `sonar.branch.name=${branchName}\n`;
19+
fs.writeFileSync(path.join(__dirname, "../sonar-project.properties"), sonarProps, { encoding: "UTF8" })
20+
}

sonar-project.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sonar.sourceEncoding=UTF-8
2+
sonar.sources=src
3+
sonar.ts.tslintconfigpath=temp/tslint.json
4+
sonar.organization=sharepoint
5+
sonar.projectKey=sp-dev-fx-controls-react
6+
sonar.host.url=https://sonarcloud.io

src/common/telemetry/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version: string = "1.8.0";
1+
export const version: string = "1.9.0";

0 commit comments

Comments
 (0)