Skip to content

Commit ff001fd

Browse files
jeremy-davis-sonarsourcehenryju
authored andcommitted
SQSCANGHA-107 Migrate install-build-wrapper
1 parent a88c96d commit ff001fd

File tree

13 files changed

+27801
-27342
lines changed

13 files changed

+27801
-27342
lines changed

dist/exec-BTlTa8sL.js

Lines changed: 27277 additions & 0 deletions
Large diffs are not rendered by default.

dist/exec-BTlTa8sL.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 40 additions & 27284 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/install-build-wrapper.js

Lines changed: 207 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/install-build-wrapper.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install-build-wrapper/action.yml

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Install Build Wrapper for C and C++'
1+
name: "Install Build Wrapper for C and C++"
22
description: >
33
Download and install the Build Wrapper for C, C++, and Objective-C
44
projects analyzed with manual config.
@@ -8,55 +8,6 @@ branding:
88
outputs:
99
build-wrapper-binary:
1010
description: "Absolute path to Build Wrapper binary."
11-
value: ${{ steps.setup-outputs.outputs.build-wrapper-binary }}
1211
runs:
13-
using: "composite"
14-
15-
steps:
16-
# install packaged required for greadlink and sha256sum command on macOS
17-
- name: Install required packages for macOS
18-
if: runner.os == 'macOS'
19-
shell: bash
20-
run: brew install coreutils
21-
22-
- name: Set SONAR_HOST_URL to 'https://sonarcloud.io'
23-
if: env.SONAR_HOST_URL == ''
24-
shell: bash
25-
run: |
26-
echo "Setting SONAR_HOST_URL to 'https://sonarcloud.io'"
27-
echo "SONAR_HOST_URL=https://sonarcloud.io" >> $GITHUB_ENV
28-
29-
- name: Configure paths
30-
id: configure_paths
31-
shell: bash
32-
env:
33-
OS: ${{ runner.os }}
34-
ARCH: ${{ runner.arch }}
35-
INSTALL_PATH: ${{ runner.temp }} # TODO: or .sonar, if RUNNER_TEMP creates problem with caching and self-hosted runners
36-
run: ${GITHUB_ACTION_PATH}/../scripts/configure_paths.sh >> $GITHUB_OUTPUT
37-
38-
- name: Download and install Build Wrapper
39-
shell: bash
40-
env:
41-
DOWNLOAD_URL: ${{ steps.configure_paths.outputs.build-wrapper-url }}
42-
TMP_ZIP_PATH: ${{ runner.temp }}/build-wrapper-${{ inputs.configure_paths.sonar-scanner-version }}-${{ runner.os }}-${{ runner.arch }}.zip
43-
INSTALL_PATH: ${{ runner.temp }} # TODO: or .sonar, if RUNNER_TEMP creates problem with caching and self-hosted runners
44-
run: ${GITHUB_ACTION_PATH}/../scripts/download.sh
45-
46-
- name: Setup action outputs
47-
id: setup-outputs
48-
shell: bash
49-
env:
50-
BUILD_WRAPPER_DIR: ${{ steps.configure_paths.outputs.build-wrapper-dir }}
51-
BUILD_WRAPPER_BIN: ${{ steps.configure_paths.outputs.build-wrapper-bin }}
52-
run: |
53-
source ${GITHUB_ACTION_PATH}/../scripts/utils.sh
54-
55-
BUILD_WRAPPER_BIN_DIR=$(realpath "${BUILD_WRAPPER_DIR}")
56-
echo "${BUILD_WRAPPER_BIN_DIR}" >> $GITHUB_PATH
57-
echo "'${BUILD_WRAPPER_BIN_DIR}' added to the path"
58-
59-
BUILD_WRAPPER_BIN=$(realpath "${BUILD_WRAPPER_BIN}")
60-
echo "build-wrapper-binary=${BUILD_WRAPPER_BIN}" >> $GITHUB_OUTPUT
61-
echo "'build-wrapper-binary' output set to '${BUILD_WRAPPER_BIN}'"
62-
echo "::endgroup::"
12+
using: node20
13+
main: ../dist/install-build-wrapper.js

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "6.0.0",
44
"description": "This SonarSource project, available as a GitHub Action, scans your projects with SonarQube [Server](https://www.sonarsource.com/products/sonarqube/) or [Cloud](https://www.sonarsource.com/products/sonarcloud/).",
55
"type": "module",
6-
"main": "src/index.js",
6+
"main": "src/main/index.js",
77
"scripts": {
88
"build": "rollup --config rollup.config.js",
99
"test": "node --test"

rollup.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import commonjs from "@rollup/plugin-commonjs";
22
import { nodeResolve } from "@rollup/plugin-node-resolve";
33

44
const config = {
5-
input: "src/index.js",
5+
input: [
6+
"src/main/index.js",
7+
"src/install-build-wrapper/install-build-wrapper.js",
8+
],
69
output: {
710
esModule: true,
811
dir: "dist",

0 commit comments

Comments
 (0)