From 35315164c7f82ff2dfb1e42439b8d2ea2f71bc41 Mon Sep 17 00:00:00 2001 From: Diksha Date: Sat, 13 Jun 2026 00:53:53 +0530 Subject: [PATCH] fix: install sdk in workflow --- .github/workflows/create-github-release.yml | 5 ++-- messages/scan.md | 26 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index 000d54e..389f286 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -6,12 +6,12 @@ on: - main - prerelease/** tags-ignore: - - "*" + - '*' workflow_dispatch: inputs: prerelease: type: string - description: "Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here." + description: 'Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here.' jobs: release: @@ -24,6 +24,7 @@ jobs: # However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty # This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.) skip-on-empty: ${{ github.event_name == 'push' }} + preSwapCommands: 'python3.11 -m pip install --upgrade pip && python3.11 -m pip install salesforce-data-customcode' # docs: # # Most repos won't use this # # Depends on the 'release' job to avoid git collisions, not for any functionality reason diff --git a/messages/scan.md b/messages/scan.md index e520836..3ba8495 100644 --- a/messages/scan.md +++ b/messages/scan.md @@ -6,6 +6,8 @@ Scan the Data Code Extension %s package for permissions and dependencies. Scans Python files in an initialized Data Code Extension package directory to identify required permissions and dependencies. Updates the config.json and requirements.txt files based on the code analysis. +This command requires Python 3.11 and the salesforce-data-customcode package to be installed. The package includes pipreqs, which is used to scan Python files for external package dependencies. + # examples.script - Scan with a custom entrypoint file: @@ -34,6 +36,30 @@ Scans Python files in an initialized Data Code Extension package directory to id <%= config.bin %> data-code-extension function scan --entrypoint ./my-function-package/payload/entrypoint.py --no-requirements +# info.checkingPython + +Checking Python version... + +# info.pythonFound + +Python %s found at '%s' + +# info.checkingPackages + +Checking required Python packages... + +# info.packageFound + +Package '%s' version %s found + +# info.checkingBinary + +Checking datacustomcode binary... + +# info.binaryFound + +Datacustomcode binary version %s found + # info.executingScan Scanning package for permissions and dependencies...