diff --git a/nodes/FriendGrid/FriendGrid.node.ts b/nodes/FriendGrid/FriendGrid.node.ts index d54e906..e074d51 100644 --- a/nodes/FriendGrid/FriendGrid.node.ts +++ b/nodes/FriendGrid/FriendGrid.node.ts @@ -25,6 +25,8 @@ import { OptionsWithUri } from 'request'; +import { version } from '../version'; + export class FriendGrid implements INodeType { description: INodeTypeDescription = { displayName: 'FriendGrid', @@ -33,7 +35,7 @@ export class FriendGrid implements INodeType { group: ['transform'], version: 1, subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}', - description: 'Consume FriendGrid API', + description: `Consume FriendGrid API (v.${version})`, defaults: { name: 'FriendGrid', color: '#1A82e2', diff --git a/nodes/version.ts b/nodes/version.ts new file mode 100644 index 0000000..98ff9a2 --- /dev/null +++ b/nodes/version.ts @@ -0,0 +1,2 @@ +// Generated by genversion. +export const version = '0.1.0'; diff --git a/package.json b/package.json index ccf032e..5ae855f 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,15 @@ "main": "index.js", "scripts": { "dev": "npm run watch", - "build": "tsc && gulp", + "build": "tsc && gulp && genversion -s -e nodes/version.ts && git add .", "lint": "tslint -p tsconfig.json -c tslint.json", "lintfix": "tslint --fix -p tsconfig.json -c tslint.json", "nodelinter": "nodelinter", "watch": "tsc --watch", "test": "jest", - "release": "npm run build && npm publish --access=public" + "release": "npm run build && npm publish --access=public", + "version": "npm run build && genversion -s -e nodes/version.ts", + "postversion": "git push" }, "files": [ "dist" @@ -39,6 +41,7 @@ "@types/jest": "^27.4.0", "@types/node": "14.17.27", "@types/request-promise-native": "~1.0.15", + "genversion": "^3.1.1", "gulp": "^4.0.0", "jest": "^27.4.7", "n8n-workflow": "~0.93.0",