Skip to content

Commit

Permalink
feat: add api version 51 (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon authored Apr 27, 2021
1 parent fea248c commit 1d4fc25
Show file tree
Hide file tree
Showing 5 changed files with 1,286 additions and 5 deletions.
6 changes: 5 additions & 1 deletion bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ const options = program
'-D, --ignore-destructive [file]',
'ignore file to use [./.forceignore]'
)
.option('-a, --api-version [version]', 'salesforce API version [50]', '50')
.option(
'-a, --api-version [version]',
`salesforce API version [${pjson.sfdc.latestApiVersion}]`,
pjson.sfdc.latestApiVersion
)
.option('-r, --repo [dir]', 'git repository location [.]', '.')
.option('-d, --generate-delta', 'generate delta files in [./output] folder')
.parse(process.argv)
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"prepare": "husky install",
"release": "standard-version --no-verify",
"release:github": "conventional-github-releaser -p angular",
"release:tags": "git push --follow-tags origin master -f --no-verify"
"release:tags": "git push --follow-tags origin master -f --no-verify",
"increment:apiversion": "jq '.sfdc.latestApiVersion = (.sfdc.latestApiVersion|tonumber + 1 |tostring)' package.json | sponge package.json && filename=`ls src/metadata/v*.json | tail -1` && version=${filename//[!0-9]/} && ((version++)) && targetname=\"src/metadata/v${version}.json\" && \\cp $filename $targetname"
},
"devDependencies": {
"@commitlint/cli": "^12.1.1",
Expand Down Expand Up @@ -104,5 +105,8 @@
},
"publishConfig": {
"access": "public"
},
"sfdc": {
"latestApiVersion": "51"
}
}
}
4 changes: 3 additions & 1 deletion src/commands/sgd/source/delta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Messages } from '@salesforce/core'
import { AnyJson } from '@salesforce/ts-types'
import * as sgd from '../../../main.js'

const pjson = require('../../../../package.json')

// Initialize Messages with the current plugin directory
Messages.importMessagesDirectory(__dirname)
const COMMAND_NAME = 'delta'
Expand Down Expand Up @@ -46,7 +48,7 @@ export default class SourceDeltaGenerate extends SfdxCommand {
'api-version': flags.number({
char: 'a',
description: messages.getMessage('apiVersionFlag'),
default: 50.0,
default: parseFloat(pjson.sfdc.latestApiVersion),
}),
'generate-delta': flags.boolean({
char: 'd',
Expand Down
1 change: 0 additions & 1 deletion src/index.ts

This file was deleted.

Loading

0 comments on commit 1d4fc25

Please sign in to comment.