Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

source:push forceoverwrite #37

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ This buildpack requires the following to be present in the Salesforce app reposi
open-path:
import-data: false
data-plans:
source-force-push: false
```

3. **sfdx-project.json**: If you are using Unlocked Packages, which is the default behavior, you'll need to ensure the required packaging data is in your `sfdx-project.json` file.
Expand Down
1 change: 1 addition & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ debug "delete-scratch-org: $delete_scratch_org"
debug "show-scratch-org-url: $show_scratch_org_url"
debug "open-path: $open_path"
debug "data-plans: $data_plans"
debug "source-force-push: $source_force_push"

# Set path for Dev Hub auth file
devHubAuthFile=$BUILD_DIR/$vendorDir/sfdxurl
Expand Down
7 changes: 6 additions & 1 deletion lib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ debug "delete-scratch-org: $delete_scratch_org"
debug "show_scratch_org_url: $show_scratch_org_url"
debug "open-path: $open_path"
debug "data-plans: $data_plans"
debug "source-force-push: $source_force_push"

# If review app or CI
if [ "$STAGE" == "" ]; then
Expand All @@ -79,7 +80,11 @@ if [ "$STAGE" == "" ]; then
auth "$scratchSfdxAuthUrlFile" "" s "$TARGET_SCRATCH_ORG_ALIAS"

# Push source
invokeCmd "sfdx force:source:push -u $TARGET_SCRATCH_ORG_ALIAS"
if [ "$source_force_push" == "true" ]; then
invokeCmd "sfdx force:source:push -f -u $TARGET_SCRATCH_ORG_ALIAS"
else
invokeCmd "sfdx force:source:push -u $TARGET_SCRATCH_ORG_ALIAS"
fi

# Show scratch org URL
if [ "$show_scratch_org_url" == "true" ]; then
Expand Down