Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI cleanup #266

Merged
merged 16 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 31 additions & 9 deletions .github/workflows/deploy.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Pipeline for Nebula Logger
name: Deployment
name: Build

on:
push:
Expand Down Expand Up @@ -43,7 +43,6 @@ jobs:
code-quality-tests:
name: 'Run Code Quality Tests'
runs-on: ubuntu-latest
environment: Test
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -88,7 +87,6 @@ jobs:
name: 'Run LWC Tests'
needs: [code-quality-tests]
runs-on: ubuntu-latest
environment: Test
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -116,12 +114,11 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
flags: LWC

# TODO find a way to consolidate duplicated LOC for scratch org steps
base-scratch-org-tests:
name: 'Run Base Scratch Org Tests'
needs: [code-quality-tests]
runs-on: ubuntu-latest
environment: Test
environment: 'Base Scratch Org'
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -168,7 +165,7 @@ jobs:
name: 'Run Experience Cloud Scratch Org Tests'
needs: [code-quality-tests]
runs-on: ubuntu-latest
environment: Test
environment: 'Experience Cloud Scratch Org'
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -215,7 +212,6 @@ jobs:
- name: 'Run Apex Tests'
run: npm run test:apex

# TODO revisit this part - for now, CodeCov.io upload will only run in the Experience Cloud org
- name: 'Delete unsupported code coverage files'
run: rm ./test-coverage/apex/test-result-707*-codecoverage.json

Expand All @@ -234,7 +230,7 @@ jobs:
needs: [lwc-tests, base-scratch-org-tests, experience-cloud-scratch-org-tests]
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
environment: Test
environment: 'Demo Org'
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -288,7 +284,7 @@ jobs:
needs: [lwc-tests, base-scratch-org-tests, experience-cloud-scratch-org-tests]
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
environment: Test
environment: 'Demo Org'
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2
Expand Down Expand Up @@ -319,3 +315,29 @@ jobs:

- name: 'Create Beta Managed Package Version'
run: npm run package:version:create:managed

promote-package-versions:
name: 'Promote Package Versions'
needs: [lwc-tests, base-scratch-org-tests, experience-cloud-scratch-org-tests]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v2

- name: 'Restore node_modules cache'
id: cache-npm
uses: actions/cache@v2
with:
path: node_modules
key: npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ env.cache-name }}-
npm-

- name: 'Install npm dependencies'
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci

- name: 'Promote package versions'
run: npx pwsh ./config/scripts/build/promote-readme-packages.ps1
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

Designed for Salesforce admins, developers & architects. A robust logger for Apex, Lightning Components, Flow, Process Builder & Integrations.

## Unlocked Package - v4.6.15
## Unlocked Package - v4.6.16

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lKDQAY)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lKDQAY)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lLzQAI)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lLzQAI)
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)

## Managed Package - v4.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function Update-README-Package-Version-Id {

$packageVersionId = "$packageVersionId".Trim()
# Since there are links for both the unlocked & managed packages, the unlocked package buttons are used to ensure the correct link is updated
$sandboxUnlockedPackageReplacement = "https://test.salesforce.com/packaging/installPackage.apexp?p0=$packageVersionId"
$sandboxUnlockedPackageReplacement = "btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=$packageVersionId"
((Get-Content -path $targetreadme -Raw) -replace "btn-install-unlocked-package-sandbox.png\)\]\(https:\/\/test.salesforce.com\/packaging\/installPackage.apexp\?p0=.{0,18}", $sandboxUnlockedPackageReplacement) | Set-Content -Path $targetreadme -NoNewline
$productionUnlockedPackageReplacement = "btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=$packageVersionId"
((Get-Content -path $targetreadme -Raw) -replace "btn-install-unlocked-package-production.png\)\]\(https:\/\/login.salesforce.com\/packaging\/installPackage.apexp\?p0=.{0,18}", $productionUnlockedPackageReplacement) | Set-Content -Path $targetreadme -NoNewline
Expand Down
24 changes: 24 additions & 0 deletions config/scripts/build/promote-readme-packages.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This script finds any production install links for packages within README files & automatically promotes them

$DebugPreference = 'Continue'
$ErrorActionPreference = 'Stop'

function Start-Package-Promotion {
Write-Debug "Beginning promote script"

$allReadmes = Get-ChildItem -Exclude node_modules, .sfdx, tests | Get-ChildItem -Filter README.md -Recurse
foreach ($readme in $allReadmes) {
$readmePackageIdResults = (Select-String -Path $readme 'https:\/\/login.salesforce.com\/packaging\/installPackage.apexp\?p0=.{0,18}')
if ($readmePackageIdResults.Matches.Length -gt 0) {
$packageIdSplit = $readmePackageIdResults.Matches[0].Value.Split("=")
if ($packageIdSplit.Length -eq 2) {
$packageId = $packageIdSplit[1]
Write-Debug "Promoting $packageId from $readme"
npx sfdx force:package:version:promote --package $packageId --noprompt
}
}
}
Write-Debug "Finished package promotion!"
}

Start-Package-Promotion

This file was deleted.

This file was deleted.

Loading