Skip to content

Commit

Permalink
fix branch && rename in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Mar 11, 2024
1 parent 90b5aa4 commit 49db48a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions documentation/docs/developer-guide/github-actions/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,9 @@ Smoke tests for the starsky-tools
Build the Electron app on pull request without .NET so faster but does not run the app
For Windows and Mac OS builds the app and runs the unit tests

[![Docker buildx multi-arch CI unstable master](https://github.com/qdraw/starsky/actions/workflows/starskyapp-electron-pr-build-mac-win.yml/badge.svg)](https://github.com/qdraw/starsky/actions/workflows/starskyapp-electron-pr-build-mac-win.yml)
[![Docker buildx multi-arch CI unstable master](https://github.com/qdraw/starsky/actions/workflows/desktop-electron-pr-build-mac-win.yml/badge.svg)](https://github.com/qdraw/starsky/actions/workflows/desktop-electron-pr-build-mac-win.yml)

> [starskyapp-electron-pr-build-mac-win.yml](https://github.com/qdraw/starsky/actions/workflows/starskyapp-electron-pr-build-mac-win.yml)
> [desktop-electron-pr-build-mac-win.yml](https://github.com/qdraw/starsky/actions/workflows/desktop-electron-pr-build-mac-win.yml)
## storybook clientapp netlify

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ _See `./pipelines/azure` for details_

The pipeline below is to test the Desktop build process. The .NET part isn't build in this pipeline, but it's needed to run the Desktop app.

[![starskyDesktop Electron PR (Missing .NET dependency)](https://github.com/qdraw/starsky/actions/workflows/starskyapp-electron-pr-build-mac-win.yml/badge.svg)](https://github.com/qdraw/starsky/actions/workflows/starskyapp-electron-pr-build-mac-win.yml)
[![starskyDesktop Electron PR (Missing .NET dependency)](https://github.com/qdraw/starsky/actions/workflows/desktop-electron-pr-build-mac-win.yml/badge.svg)](https://github.com/qdraw/starsky/actions/workflows/desktop-electron-pr-build-mac-win.yml)

A full build including the .NET dependency

Expand Down
25 changes: 16 additions & 9 deletions starskydesktop/sonar-scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const options = {
"sonar.projectKey": projectKey,

// projectName - defaults to project key
"sonar.projectName": "StarskyDesktop",
"sonar.projectName": projectKey,

"sonar.organization": organization,

Expand All @@ -63,15 +63,22 @@ const options = {
"sonar.sourceEncoding": "UTF-8",
};

let gitBranchName = "";
try {
// Execute the git command to get the current branch name
gitBranchName = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
console.log("Current branch:", gitBranchName);
} catch (error) {
console.error("Error getting branch name:", error);
}

if (!gitBranchName) {
console.error("Set to Default Branch name: master")
gitBranchName = "master";
}

if (!isPrBuild) {
try {
// Execute the git command to get the current branch name
const branchName = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
console.log("Current branch:", branchName);
options["sonar.branch.name"] = branchName;
} catch (error) {
console.error("Error getting branch name:", error);
}
options["sonar.branch.name"] = gitBranchName;
}

if (isPrBuild) {
Expand Down

0 comments on commit 49db48a

Please sign in to comment.