From 296dc8766ab44a7f81566c758081484667085b54 Mon Sep 17 00:00:00 2001 From: Luke Bermingham Date: Thu, 21 Nov 2024 21:59:09 +1000 Subject: [PATCH] Remove NPM link scripts and GHA workflows --- .github/workflows/create-gh-release.yml | 6 +++--- .github/workflows/healthcheck-libraries.yml | 10 +++++----- .github/workflows/healthcheck-streaming.yml | 5 ----- .../workflows/publish-signalling-library-to-npm.yml | 2 +- SignallingWebServer/platform_scripts/bash/common.sh | 3 --- SignallingWebServer/platform_scripts/cmd/common.bat | 1 - 6 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/create-gh-release.yml b/.github/workflows/create-gh-release.yml index d1be9ef5..360deded 100644 --- a/.github/workflows/create-gh-release.yml +++ b/.github/workflows/create-gh-release.yml @@ -45,15 +45,15 @@ jobs: - name: Build frontend library working-directory: ./Frontend/library - run: npm ci && npm link ../../Common && npm run build + run: npm ci && npm run build - name: Build frontend ui-library working-directory: ./Frontend/ui-library - run: npm ci && npm link ../library && npm run build + run: npm ci && npm run build - name: Install implementations/typescript deps working-directory: ./Frontend/implementations/typescript - run: npm ci && npm link ../../library ../../ui-library && npm run build + run: npm ci && npm run build - name: Move all content into output directory for archiving run: items=(*) && mkdir PixelStreamingInfrastructure-${{ github.ref_name }}-${{ steps.getversion.outputs.version }} && mv ${items[*]} PixelStreamingInfrastructure-${{ github.ref_name }}-${{ steps.getversion.outputs.version }}/ diff --git a/.github/workflows/healthcheck-libraries.yml b/.github/workflows/healthcheck-libraries.yml index 6ec78352..390ab7da 100644 --- a/.github/workflows/healthcheck-libraries.yml +++ b/.github/workflows/healthcheck-libraries.yml @@ -41,21 +41,21 @@ jobs: - name: Clean build and lint checks on signalling library working-directory: Signalling - run: npm ci && npm link ../Common && npm run build && npm run lint + run: npm ci && npm run build && npm run lint - name: Clean build and lint checks on wilbur working-directory: SignallingWebServer - run: npm ci && npm link ../Signalling && npm run build && npm run lint + run: npm ci && npm run build && npm run lint - name: Clean build, lint and unit tests on frontend library working-directory: Frontend/library - run: npm ci && npm link ../../Common && npm run build && npm run lint && npm run test + run: npm ci && npm run build && npm run lint && npm run test - name: Clean build and lint checks on frontend ui library working-directory: Frontend/ui-library - run: npm ci && npm link ../library && npm run build && npm run lint + run: npm ci && npm run build && npm run lint - name: Clean build of frontend implementation working-directory: Frontend/implementations/typescript - run: npm ci && npm link ../../library ../../ui-library && npm run build + run: npm ci && npm run build diff --git a/.github/workflows/healthcheck-streaming.yml b/.github/workflows/healthcheck-streaming.yml index 688ec5f8..17d859d6 100644 --- a/.github/workflows/healthcheck-streaming.yml +++ b/.github/workflows/healthcheck-streaming.yml @@ -75,28 +75,24 @@ jobs: working-directory: Signalling run: | npm ci - npm link ../Common npm run build - name: Build Wilbur working-directory: SignallingWebServer run: | npm ci - npm link ../Signalling npm run build - name: Build Frontend lib working-directory: Frontend/library run: | npm ci - npm link ../../Common npm run build - name: Build Frontend ui lib working-directory: Frontend/ui-library run: | npm ci - npm link ../library npm run build - name: Build Frontend implementation @@ -104,7 +100,6 @@ jobs: run: | $Env:WEBPACK_OUTPUT_PATH='${{ github.workspace }}\www' npm ci - npm link ../../library ../../ui-library npm run build - name: Run Signalling diff --git a/.github/workflows/publish-signalling-library-to-npm.yml b/.github/workflows/publish-signalling-library-to-npm.yml index a3ab0781..0c7aa1d0 100644 --- a/.github/workflows/publish-signalling-library-to-npm.yml +++ b/.github/workflows/publish-signalling-library-to-npm.yml @@ -23,7 +23,7 @@ jobs: registry-url: 'https://registry.npmjs.org' - working-directory: Common run: npm ci && npm run build - - run: npm ci && npm link ../Common && npm run build + - run: npm ci && npm run build - run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/SignallingWebServer/platform_scripts/bash/common.sh b/SignallingWebServer/platform_scripts/bash/common.sh index 30bda40f..12f2ad1a 100644 --- a/SignallingWebServer/platform_scripts/bash/common.sh +++ b/SignallingWebServer/platform_scripts/bash/common.sh @@ -212,17 +212,14 @@ function setup_frontend() { popd > /dev/null pushd ${SCRIPT_DIR}/../../../Frontend/library > /dev/null ${SCRIPT_DIR}/node/bin/npm install - ${SCRIPT_DIR}/node/bin/npm link ../../Common ${SCRIPT_DIR}/node/bin/npm run build popd > /dev/null pushd ${SCRIPT_DIR}/../../../Frontend/ui-library > /dev/null ${SCRIPT_DIR}/node/bin/npm install - ${SCRIPT_DIR}/node/bin/npm link ../library ${SCRIPT_DIR}/node/bin/npm run build popd > /dev/null pushd ${SCRIPT_DIR}/../../../Frontend/implementations/typescript > /dev/null ${SCRIPT_DIR}/node/bin/npm install - ${SCRIPT_DIR}/node/bin/npm link ../../library ../../ui-library ${SCRIPT_DIR}/node/bin/npm run build popd > /dev/null else diff --git a/SignallingWebServer/platform_scripts/cmd/common.bat b/SignallingWebServer/platform_scripts/cmd/common.bat index 325ad7af..8e0cebf2 100644 --- a/SignallingWebServer/platform_scripts/cmd/common.bat +++ b/SignallingWebServer/platform_scripts/cmd/common.bat @@ -163,7 +163,6 @@ set PATH=%NODE_DIR%;%PATH% IF "%FORCE_BUILD%"=="1" ( rem We could replace this all with a single npm script that does all this. we do have several build-all scripts already rem but this does give a good reference about the dependency chain for all of this. - rem Note: npm link will also run npm install so we dont need that here echo Building common library... echo ---------------------------- pushd %CD%\Common