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

Commit

Permalink
feat: include sf
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Aug 23, 2021
1 parent 3465d21 commit c343f3e
Show file tree
Hide file tree
Showing 7 changed files with 3,201 additions and 1,963 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ jobs:
- run: ./scripts/monitor-plugin-nuts.js <<parameters.nuts_job_data>>

workflows:
version: 2.1
version: 2
test-and-release:
when: << pipeline.parameters.run-auto-workflows >>
jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ coverage

# generated docs
docs
oclif.manifest.json

# ignore sfdx-trust files
*.tgz
Expand Down
26 changes: 12 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"bugs": "https://github.com/forcedotcom/cli/issues",
"homepage": "https://github.com/salesforcecli/sfdx-cli/",
"bin": {
"sfdx": "bin/run"
"sfdx": "bin/run",
"sf": "node_modules/@salesforce/cli/bin/run"
},
"engines": {
"node": ">=10"
Expand All @@ -16,7 +17,7 @@
"bin",
"oclif.manifest.json",
"dist/**/*.js",
"scripts/clean-for-tarballs",
"scripts/include-sf.js",
"!dist/**/*.test.js"
],
"oclif": {
Expand Down Expand Up @@ -66,22 +67,16 @@
"salesforce-alm"
],
"devPlugins": [
"@oclif/plugin-command-snapshot"
"@oclif/plugin-command-snapshot",
"@salesforce/plugin-release-management"
],
"update": {
"s3": {
"bucket": "dfc-data-production",
"indexVersionLimit": 20,
"folder": "media/salesforce-cli/sfdx",
"acl": " ",
"host": "https://developer.salesforce.com",
"templates": {
"target": {
"baseDir": "sfdx-cli-v<%- version %>-<%- platform === 'win32' ? 'windows' : platform %>-<%- arch %>",
"manifest": "media/salesforce-cli/sfdx-cli/channels/<%- channel %>/<%- platform === 'win32' ? 'windows' : platform %>-<%- arch %>",
"versioned": "media/salesforce-cli/sfdx-cli/channels/<%- channel %>/sfdx-cli-v<%- version %>-<%- platform === 'win32' ? 'windows' : platform %>-<%- arch %>.tar.<%- ext %>"
}
}
"host": "https://developer.salesforce.com"
}
},
"macos": {
Expand All @@ -93,6 +88,7 @@
}
},
"pinnedDependencies": [
"@salesforce/cli",
"@salesforce/plugin-alias",
"@salesforce/plugin-apex",
"@salesforce/plugin-auth",
Expand Down Expand Up @@ -121,6 +117,7 @@
"@oclif/plugin-update": "1.4.0-3",
"@oclif/plugin-warn-if-update-available": "^1.7.0",
"@oclif/plugin-which": "^1.0.3",
"@salesforce/cli": "ssh://[email protected]:salesforcecli/cli.git#mdonnalley/inclusion",
"@salesforce/kit": "^1.5.13",
"@salesforce/lazy-require": "^0.4.0",
"@salesforce/plugin-alias": "1.1.10",
Expand Down Expand Up @@ -151,6 +148,7 @@
"@oclif/plugin-command-snapshot": "^2.0.0",
"@salesforce/dev-config": "^2.1.2",
"@salesforce/dev-scripts": "^0.9.11",
"@salesforce/plugin-release-management": "^1.16.1",
"@salesforce/prettier-config": "^0.0.2",
"@salesforce/ts-sinon": "^1.3.12",
"@types/debug": "^4.1.5",
Expand Down Expand Up @@ -180,7 +178,7 @@
"mocha": "^8.4.0",
"npm": "^7.15.1",
"nyc": "^15.1.0",
"oclif": "^1.18.0",
"oclif": "^1.18.1",
"prettier": "^2.3.0",
"pretty-quick": "^3.1.0",
"shelljs": "^0.8.4",
Expand All @@ -201,9 +199,9 @@
"pack:docker:slim": "./scripts/docker-publish-slim.js",
"pack:docker:full": "./scripts/docker-publish-full.js",
"pack:macos": "oclif pack:macos",
"pretarball": "./scripts/clean-for-tarballs",
"pretarball": "sf-release cli:tarballs:prepare && ./scripts/include-sf.js",
"pack:tarballs": "oclif pack:tarballs",
"pack:verify": "./scripts/verify-tarballs",
"pack:verify": "sf-release cli:tarballs:verify",
"pack:win": "oclif pack:win",
"postpack": "rm -f oclif.manifest.json",
"posttest": "yarn test:deprecation-policy ",
Expand Down
64 changes: 0 additions & 64 deletions scripts/clean-for-tarballs

This file was deleted.

37 changes: 37 additions & 0 deletions scripts/include-sf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env node

const path = require('path');
const shelljs = require('shelljs');
const fs = require('fs');

const sfUnixPath = path.resolve('node_modules/@salesforce/cli/bin/run');
const sfBin = path.join('bin', 'sf');
const sfdxBin = path.join('bin', 'sfdx');

const sfWinPath = 'node_modules\\@salesforce\\cli\\bin\\run';
const sfCmd = path.join('bin', 'sf.cmd');
const sfdxCmd = path.join('bin', 'sfdx.cmd');

console.log(`---- Including SF ----`);

const binContents = fs
.readFileSync(sfdxBin, 'UTF-8')
.replace(/sfdx/g, 'sf')
.replace(/SFDX/g, 'SF')
.replace(/\$DIR\/run/g, sfUnixPath);

console.log(` Writing ${sfBin}`);
fs.writeFileSync(sfBin, binContents);
shelljs.chmod('+x', sfBin);

console.log(` Updating ${sfCmd} with references to sf`);
const cmdContents = fs
.readFileSync(sfdxCmd, 'UTF-8')
.replace(/sfdx/g, 'sf')
.replace(/SFDX/g, 'SF')
.replace(/bin\\run/g, sfWinPath);

console.log(` Writing ${sfCmd}`);
fs.writeFileSync(sfCmd, cmdContents);

console.log(`---- Finished ----`);
141 changes: 0 additions & 141 deletions scripts/verify-tarballs

This file was deleted.

Loading

0 comments on commit c343f3e

Please sign in to comment.