Skip to content

Commit c1f36b8

Browse files
authored
CHANGE: @W-18097146@ Updates for GA (#1771)
1 parent 82cc025 commit c1f36b8

File tree

13 files changed

+67
-52
lines changed

13 files changed

+67
-52
lines changed

.github/ISSUE_TEMPLATE/0-code_analyzer_bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ body:
7474
description: |
7575
What do you get from the command "sf plugins"?
7676
placeholder: |
77-
Example: code-analyzer 5.0.0-beta.0
77+
Example: code-analyzer 5.0.0
7878
validations:
7979
required: true
8080
- type: input

.github/workflows/apply-npm-tag-to-version.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ on:
88
type: choice
99
options:
1010
- '@salesforce/plugin-code-analyzer'
11-
- '@salesforce/sfdx-scanner'
11+
# TODO: Remove after April Release
12+
- '@salesforce/sfdx-scanner'
1213
tag_name:
1314
description: 'Tag Name (ex: latest):'
1415
required: true
1516
type: string
1617
version:
17-
description: 'Version (ex: 4.8.0):'
18+
description: 'Version (ex: 5.2.0):'
1819
required: true
1920
type: string
2021
confirm:

.github/workflows/automated-release-tasks.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,22 @@ jobs:
3131
needs: verify-should-run
3232
if: ${{ needs.verify-should-run.outputs.should-run == 'true' }}
3333
steps:
34-
- name: Invoke v5 beta workflow
34+
- name: Invoke v5 workflow
3535
uses: actions/github-script@v6
3636
with:
3737
github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
38+
# TODO: remove inputs after April Release; will default to minor
3839
script: |
3940
await github.rest.actions.createWorkflowDispatch({
4041
owner: context.repo.owner,
4142
repo: context.repo.repo,
4243
workflow_id: 'create-release-branch.yml',
43-
ref: 'dev'
44+
ref: 'dev',
45+
inputs: {
46+
"release-type": "patch"
47+
}
4448
});
49+
# TODO: Remove this after last v4.x release in April
4550
create-v4-release-branch:
4651
runs-on: macos-latest
4752
needs: verify-should-run

.github/workflows/create-release-branch.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
name: create-release-branch
22
on:
33
workflow_dispatch:
4+
inputs:
5+
# When the workflow is executed manually, the user can select whether the branch should correspond to a major,
6+
# minor, or patch release.
7+
release-type:
8+
type: choice
9+
description: What kind of release?
10+
options:
11+
- major
12+
- minor
13+
- patch
14+
required: true
415

516
jobs:
617
create-release-branch:
@@ -24,7 +35,15 @@ jobs:
2435
# Increment the version as desired locally, without actually committing anything.
2536
- name: Locally increment version
2637
run: |
27-
npm --no-git-tag-version version prerelease --preid beta
38+
# A workflow dispatch event lets the user specify what release type they want.
39+
if [[ "${{ github.event_name }}" = "workflow_dispatch" ]]; then
40+
RELEASE_TYPE=${{ github.event.inputs.release-type }}
41+
# The regularly scheduled releases are always minor.
42+
else
43+
RELEASE_TYPE=minor
44+
fi
45+
# Increment the version as needed.
46+
npm --no-git-tag-version version $RELEASE_TYPE
2847
# The branch protection rule for `release-x.y.z` branches prevents pushing commits directly. To work around this,
2948
# we create an interim branch that we _can_ push commits to, and we'll do our version bookkeeping in that branch
3049
# instead.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#TODO: remove v4 with April Release
2+
name: daily-smoke-tests-v4
3+
on:
4+
workflow_dispatch: # As per documentation, the colon is necessary even though no config is required.
5+
schedule:
6+
# Cron syntax is "minute[0-59] hour[0-23] date[1-31] month[1-12] day[0-6]". '*' is 'any value,' and multiple values
7+
# can be specified with comma-separated lists. All times are UTC.
8+
# So this expression means "run at 13:30 UTC every day". This time was chosen because it corresponds to
9+
# 8:30AM CDT, meaning that any issues will be surfaced before the start of business.
10+
- cron: "30 13 * * *"
11+
jobs:
12+
smoke-test:
13+
uses: ./.github/workflows/run-tests.yml
14+
with:
15+
node-matrix: "[{version: 'lts/*', artifact: 'lts'}, {version: 'latest', artifact: 'latest'}]"
16+
v4-smoke-test:
17+
runs-on: macos-latest
18+
steps:
19+
- name: Invoke v4 smoke tests
20+
uses: actions/github-script@v6
21+
with:
22+
github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
23+
script: |
24+
await github.rest.actions.createWorkflowDispatch({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
workflow_id: 'daily-smoke-tests.yml',
28+
ref: 'dev-4'
29+
});
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: daily-smoke-tests
22
on:
3-
workflow_dispatch: # As per documentation, the colon is necessary even though no config is required.
3+
workflow_dispatch:
44
schedule:
55
# Cron syntax is "minute[0-59] hour[0-23] date[1-31] month[1-12] day[0-6]". '*' is 'any value,' and multiple values
66
# can be specified with comma-separated lists. All times are UTC.
@@ -9,20 +9,8 @@ on:
99
- cron: "30 13 * * *"
1010
jobs:
1111
smoke-test:
12+
# We run the daily smoke tests against 'dev' to validate that the code currently in development is still valid
1213
uses: ./.github/workflows/run-tests.yml
1314
with:
1415
node-matrix: "[{version: 'lts/*', artifact: 'lts'}, {version: 'latest', artifact: 'latest'}]"
15-
v4-smoke-test:
16-
runs-on: macos-latest
17-
steps:
18-
- name: Invoke v4 smoke tests
19-
uses: actions/github-script@v6
20-
with:
21-
github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
22-
script: |
23-
await github.rest.actions.createWorkflowDispatch({
24-
owner: context.repo.owner,
25-
repo: context.repo.repo,
26-
workflow_id: 'daily-smoke-tests.yml',
27-
ref: 'dev-4'
28-
});
16+
branch: dev

.github/workflows/publish-to-npm.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
with:
5454
ctc: false # We've been told we don't have to care about this until someone makes us care.
5555
sign: true
56-
tag: latest-beta-rc # Publish as a release candidate, so we can do our validations against it.
56+
tag: latest-rc # Publish as a release candidate, so we can do our validations against it.
5757
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
5858
secrets: inherit
5959
# Step 3: Run smoke tests against the release candidate.
@@ -84,7 +84,7 @@ jobs:
8484
python-version: '>=3.10'
8585
# Install SF, and the release candidate version.
8686
- run: npm install -g @salesforce/cli
87-
- run: sf plugins install @salesforce/plugin-code-analyzer@latest-beta-rc
87+
- run: sf plugins install @salesforce/plugin-code-analyzer@latest-rc
8888
# Log the installed plugins for easier debugging.
8989
- run: sf plugins
9090
# Attempt to run the smoke tests.
@@ -105,7 +105,6 @@ jobs:
105105
node-version: 'lts/*'
106106
- run: |
107107
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
108-
npm dist-tag add @salesforce/plugin-code-analyzer@${{ github.event.release.tag_name || inputs.tag }} latest-beta
109108
npm dist-tag add @salesforce/plugin-code-analyzer@${{ github.event.release.tag_name || inputs.tag }} latest
110109
# Step 5: Create a Pull Request for merging `main` into `dev`
111110
create-main2dev-pull-request:

.github/workflows/run-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
shell: bash
116116
run: |
117117
# We need to determine the Tarball's name first.
118-
TARBALL_NAME=$(ls ~/downloads/tarball | grep salesforce-plugin-code-analyzer-5\\.0\\.0-beta\\.[0-9]*\\.tgz)
118+
TARBALL_NAME=$(ls ~/downloads/tarball | grep salesforce-plugin-code-analyzer-.*\\.tgz)
119119
# We need to determine the Tarball's location in an installable way.
120120
# Get the path to the download folder. Swap out backslashes for forward slashes to ensure Windows compatibility.
121121
RAW_TARBALL_PATH=`echo '${{ steps.download.outputs.download-path }}' | tr '\\' '/'`
@@ -130,4 +130,3 @@ jobs:
130130
with:
131131
name: smoke-test-results-${{ runner.os }}-node-${{ matrix.node.artifact }}
132132
path: smoke-test-results
133-

.github/workflows/validate-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
jobs:
77
# We want to prevent cross-contamination between the 4.x and 5.x pipelines. So we should prevent PRs
88
# based on this flow to merge into `dev-4` or `main-4`.
9+
# TODO: Remove this after the April release, since we won't care after that to maintain v4
910
verify_target_branch:
1011
runs-on: ubuntu-latest
1112
steps:

messages/shared.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# label.command-state
2-
3-
Beta
4-
5-
# warning.command-state
6-
7-
This command is in %s.
8-
91
# log.give-us-feedback
102

113
We're continually improving Salesforce Code Analyzer. Tell us what you think! Give feedback at http://sfdc.co/CodeAnalyzerFeedback.

0 commit comments

Comments
 (0)