priestine/versions

View on GitHub
src/pure/add-build-metadata.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { IAppCtx } from '../types/app-ctx'

type Ctx = Pick<IAppCtx, 'newVersion' | 'buildMetadata'>

export const addBuildMetadata = ({ newVersion, buildMetadata }: Ctx) => ({
    newVersion: buildMetadata ? newVersion.concat('+').concat(buildMetadata) : newVersion,
})