@dvabuzyarov/product-version
TypeScript icon, indicating that this package has built-in type declarations

1.0.53 • Public • Published

Build Status NPM version npm downloads Dependency Status GitHub

This angular schematic is designed to be a build pipeline action that updates product version. It looks for version property in environment.ts file.

import { IEnvironment } from "./environments";

export const environment: IEnvironment = {
  production: false,
  // will update this property
  version: "0.0.local"
};

How to use:

schematics @dvabuzyarov/product-version:product-version --productVersion="$(Build.BuildNumber)"

The schematic support other input parameters according to this schema:

{
  "$schema": "http://json-schema.org/schema",
  "id": "@dvabuzyarov/product-version",
  "type": "object",
  "properties": {
    "productVersion": {
      "type": "string",
      "description": "The product version",
      "$default": {
        "$source": "argv",
        "index": 0
      }
    },
    "propertyName": {
      "type": "string",
      "description": "The property name of the environment class",
      "$default": {
        "$source": "propertyName"
      }
    },
    "project": {
      "type": "string",
      "description": "The name of the project.",
      "$default": {
        "$source": "projectName"
      }
    },
    "path": {
      "type": "string",
      "format": "path",
      "description": "The path to the environment folder.",
      "visible": false
    }
  },
  "required": [
    "productVersion"
  ]
}

Package Sidebar

Install

npm i @dvabuzyarov/product-version

Weekly Downloads

4

Version

1.0.53

License

MIT

Unpacked Size

68.6 kB

Total Files

25

Last publish

Collaborators

  • dvabuzyarov