Skip to content

Commit 025a917

Browse files
committed
fix: new pmd version
1 parent 8db7218 commit 025a917

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ jobs:
5858
- name: 'Install PMD'
5959
run: |
6060
PMD_VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
61-
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F$PMD_VERSION/pmd-bin-$PMD_VERSION.zip
62-
unzip pmd-bin-$PMD_VERSION.zip -d ~
61+
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F$PMD_VERSION/pmd-dist-$PMD_VERSION-bin.zip
62+
unzip pmd-dist-$PMD_VERSION-bin.zip -d ~
6363
mv ~/pmd-bin-$PMD_VERSION ~/pmd
64-
~/pmd/bin/run.sh pmd --version
64+
~/pmd/bin/pmd --version
6565
6666
# Run PMD scan
6767
- name: 'Run PMD scan'
68-
run: ~/pmd/bin/run.sh pmd -d sfdx-source/LabsActionPlans -R pmd/deployRules.xml -f text --cache .pmdCache -min 2
68+
run: ~/pmd/bin/pmd check -d sfdx-source/LabsActionPlans -R pmd/deployRules.xml -f text --cache .pmdCache -min 2

.github/workflows/pr.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
- name: 'Install PMD'
3030
run: |
3131
PMD_VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | grep '.tag_name' | sed 's:.*/::' | sed 's:",::')
32-
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F$PMD_VERSION/pmd-bin-$PMD_VERSION.zip
33-
unzip pmd-bin-$PMD_VERSION.zip -d ~
32+
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F$PMD_VERSION/pmd-dist-$PMD_VERSION-bin.zip
33+
unzip pmd-dist-$PMD_VERSION-bin.zip -d ~
3434
mv ~/pmd-bin-$PMD_VERSION ~/pmd
35-
~/pmd/bin/run.sh pmd --version
35+
~/pmd/bin/pmd --version
3636
3737
# Run PMD scan
3838
- name: 'Run PMD scan'
39-
run: ~/pmd/bin/run.sh pmd -d sfdx-source -R pmd/deployRules.xml -f text --cache .pmdCache --minimum-priority 2
39+
run: ~/pmd/bin/pmd check -d sfdx-source -R pmd/deployRules.xml -f text --cache .pmdCache --minimum-priority 2
4040
test-run:
4141
runs-on: ubuntu-latest
4242
needs: check-pmd
@@ -46,13 +46,6 @@ jobs:
4646
uses: actions/checkout@v3
4747

4848
# Install Salesforce CLI
49-
- name: 'Install Salesforce sfdx CLI'
50-
run: |
51-
npm install sfdx-cli --location=global
52-
nodeInstallPath=$(npm config get prefix)
53-
echo "$nodeInstallPath/bin" >> $GITHUB_PATH
54-
sfdx --version
55-
5649
- name: 'Install Salesforce sf CLI'
5750
run: |
5851
npm install @salesforce/cli --global
@@ -62,7 +55,7 @@ jobs:
6255
- name: 'Populate auth file with DEVHUB_SFDX_URL secret'
6356
shell: bash
6457
run: |
65-
echo ${{ secrets.DEVHUB_SFDX_URL}} > ./DEVHUB_SFDX_URL.txt
58+
echo ${{ secrets.DEVHUB_SFDX_URL }} > ./DEVHUB_SFDX_URL.txt
6659
secretFileSize=$(wc -c "./DEVHUB_SFDX_URL.txt" | awk '{print $1}')
6760
if [ $secretFileSize == 1 ]; then
6861
echo "Missing DEVHUB_SFDX_URL secret. Is this workflow running on a fork?";

0 commit comments

Comments
 (0)