From 57786e729d1b1b6a1602c48183a1f2c571c1cdad Mon Sep 17 00:00:00 2001 From: LucasZF Date: Fri, 29 Apr 2022 12:20:18 -0300 Subject: [PATCH] Enhance package validation + Remove Symbolic Links (#267) --- .github/workflows/build.yml | 32 +++++++++++++++++++++++++++++++- .npmignore | 2 +- CHANGELOG.md | 1 + 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73b20ea..e04d9ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,7 +125,6 @@ jobs: GITHUB_ACCESS_TOKEN: ${{ secrets.GH_RELEASE_PAT }} run: make build - job_artifacts: name: Upload Artifacts needs: [job_build, job_carthage_build] @@ -160,3 +159,34 @@ jobs: name: ${{ github.sha }} path: | ${{ github.workspace }}/sentry-cordova-* + + job_check_symlink: + name: Check for Symbolic Links + needs: [job_artifacts] + runs-on: macos-latest + defaults: + run: + shell: pwsh + steps: + - name: Checkout + uses: actions/checkout@v2.3.3 + + - name: Download test app artifact + uses: actions/download-artifact@v2 + with: + name: ${{ github.sha }} + path: | + ${{ github.workspace }}/artifact + - name: Extract artifact + run: | + cd ${{ github.workspace }}/artifact + $bundleName = (Get-Item *.tgz).Name + tar -xvzf "$bundleName" + + - name: Check if package contains any Symlink + run: | + $symLinks = (find "${{ github.workspace }}" -type l -ls) + if ($null -ne $symLinks) { + Write-Error "Atfifact contains illegal SymLinks`n$symLinks" + } + Write-Output "No Symbolic Links found, all good :)" diff --git a/.npmignore b/.npmignore index 1ef054e..af3d2b2 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,6 @@ * !/dist/**/* -!/src/ios/Carthage/Build/Sentry.xcframework/**/* +!/src/ios/Carthage/Build/Sentry.xcframework/ios-*/**/* !/src/ios/SentryCordova.* !/src/android/**/* !/scripts/**/* diff --git a/CHANGELOG.md b/CHANGELOG.md index ff6ca0a..d0f9162 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fixes +- Enhance package validation and Removed Symbolic Links ([#267](https://github.com/getsentry/sentry-cordova/pull/267)) - Sentry.xcframework being excluded by npm rule ([#266](https://github.com/getsentry/sentry-cordova/pull/266)) ## 1.0.1