|
7 | 7 | required: false
|
8 | 8 | type: boolean
|
9 | 9 | default: false
|
10 |
| - v4-tarball-suffix: |
11 |
| - description: 'The suffix attached to the name of the v4 tarball' |
12 |
| - required: false |
13 |
| - type: string |
14 |
| - default: 'dev-4' |
15 |
| - v5-tarball-suffix: |
16 |
| - description: 'The suffix attached to the name of the v5 tarball' |
| 10 | + tarball-suffix: |
| 11 | + description: 'The suffix attached to the name of the code-analyzer tarball' |
17 | 12 | required: false
|
18 | 13 | type: string
|
19 | 14 | default: 'dev'
|
@@ -57,60 +52,32 @@ jobs:
|
57 | 52 | # of the tests are integration tests.
|
58 | 53 | # NOTE: SFCA can come from a tarball built in a previous step,
|
59 | 54 | # or be installed as the currently-latest version.
|
60 |
| - - name: Download v4 Scanner Tarball |
| 55 | + - name: Download Code Analyzer Tarball |
61 | 56 | if: ${{ inputs.use-tarballs == true }}
|
62 |
| - id: download-v4 |
| 57 | + id: download-tarball |
63 | 58 | uses: actions/download-artifact@v4
|
64 | 59 | with:
|
65 |
| - name: tarball-${{ inputs.v4-tarball-suffix}} |
| 60 | + name: tarball-${{ inputs.tarball-suffix }} |
66 | 61 | # Download the tarball to a subdirectory of HOME, so it's guaranteed
|
67 | 62 | # to be somewhere the installation command can see.
|
68 |
| - path: ~/downloads/tarball-v4 |
69 |
| - - name: Install v4 Scanner Tarball |
| 63 | + path: ~/downloads/tarball |
| 64 | + - name: Install Code Analyzer Tarball |
70 | 65 | if: ${{ inputs.use-tarballs == true }}
|
71 | 66 | shell: bash
|
72 | 67 | run: |
|
73 | 68 | # Determine the tarball's name.
|
74 |
| - TARBALL_NAME=$(ls ~/downloads/tarball-v4/code-analyzer | grep salesforce-.*\\.tgz) |
| 69 | + TARBALL_NAME=$(ls ~/downloads/tarball/code-analyzer | grep salesforce-.*\\.tgz) |
75 | 70 | echo $TARBALL_NAME
|
76 | 71 | # Figure out where the tarball was downloaded to.
|
77 | 72 | # To allow compatibility with Windows, replace backslashes with forward slashes
|
78 | 73 | # and rip off a leading `C:` if present.
|
79 |
| - DOWNLOAD_PATH=`echo '${{ steps.download-v4.outputs.download-path }}' | tr '\\' '/'` |
| 74 | + DOWNLOAD_PATH=`echo '${{ steps.download-tarball.outputs.download-path }}' | tr '\\' '/'` |
80 | 75 | echo $DOWNLOAD_PATH
|
81 | 76 | DOWNLOAD_PATH=`[[ $DOWNLOAD_PATH = C* ]] && echo $DOWNLOAD_PATH | cut -d':' -f 2 || echo $DOWNLOAD_PATH`
|
82 | 77 | echo $DOWNLOAD_PATH
|
83 | 78 | # Pipe in a `y` to simulate agreeing to install an unsigned package. Use a URI of the file's full path.
|
84 | 79 | echo y | sf plugins install "file://${DOWNLOAD_PATH}/code-analyzer/${TARBALL_NAME}"
|
85 |
| - - name: Download v5 Code Analyzer Tarball |
86 |
| - if: ${{ inputs.use-tarballs == true }} |
87 |
| - id: download-v5 |
88 |
| - uses: actions/download-artifact@v4 |
89 |
| - with: |
90 |
| - name: tarball-${{ inputs.v5-tarball-suffix }} |
91 |
| - # Download the tarball to a subdirectory of HOME, so it's guaranteed |
92 |
| - # to be somewhere the installation command can see. |
93 |
| - path: ~/downloads/tarball-v5 |
94 |
| - - name: Install v5 Code Analyzer Tarball |
95 |
| - if: ${{ inputs.use-tarballs == true }} |
96 |
| - shell: bash |
97 |
| - run: | |
98 |
| - # Determine the tarball's name. |
99 |
| - TARBALL_NAME=$(ls ~/downloads/tarball-v5/code-analyzer | grep salesforce-.*\\.tgz) |
100 |
| - echo $TARBALL_NAME |
101 |
| - # Figure out where the tarball was downloaded to. |
102 |
| - # To allow compatibility with Windows, replace backslashes with forward slashes |
103 |
| - # and rip off a leading `C:` if present. |
104 |
| - DOWNLOAD_PATH=`echo '${{ steps.download-v5.outputs.download-path }}' | tr '\\' '/'` |
105 |
| - echo $DOWNLOAD_PATH |
106 |
| - DOWNLOAD_PATH=`[[ $DOWNLOAD_PATH = C* ]] && echo $DOWNLOAD_PATH | cut -d':' -f 2 || echo $DOWNLOAD_PATH` |
107 |
| - echo $DOWNLOAD_PATH |
108 |
| - # Pipe in a `y` to simulate agreeing to install an unsigned package. Use a URI of the file's full path. |
109 |
| - echo y | sf plugins install "file://${DOWNLOAD_PATH}/code-analyzer/${TARBALL_NAME}" |
110 |
| - - name: Install Production scanner v4 |
111 |
| - if: ${{ inputs.use-tarballs == false }} |
112 |
| - run: sf plugins install @salesforce/sfdx-scanner |
113 |
| - - name: Install Production code-analyzer v5 |
| 80 | + - name: Install Production code-analyzer |
114 | 81 | if: ${{ inputs.use-tarballs == false }}
|
115 | 82 | run: sf plugins install code-analyzer
|
116 | 83 | # Run the tests. (Linux and non-Linux need slightly different commands.)
|
|
0 commit comments