From e3f8131ca2275fcdec64a5382452aee64e5bf183 Mon Sep 17 00:00:00 2001 From: Joseph Phelan Date: Wed, 17 Jan 2024 17:57:53 -0600 Subject: [PATCH] Attempt at auto versioning --- .buildkite/deploy.sh | 1 - .buildkite/pipeline.yml | 16 ++++++++++++++++ package.json | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.buildkite/deploy.sh b/.buildkite/deploy.sh index 6f059f13..d53d8acf 100755 --- a/.buildkite/deploy.sh +++ b/.buildkite/deploy.sh @@ -6,7 +6,6 @@ TAG_VERSION=$(buildkite-agent meta-data get "tag-version" --default "0.0.0-alpha TAG_VERSION=${TAG_VERSION/v/} # Publish the package -npm version ${TAG_VERSION} npm publish --tag ${TAG_VERSION} # Annotate the build with the types version diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 7926c5a7..b4693f98 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -36,3 +36,19 @@ steps: env: NPM_TAG: latest NODE_AUTH_TOKEN: ACQUIA_JFROG_TOKEN + + - label: 'Auto version' + branches: 'master' + command: + - TAG_VERSION=$(buildkite-agent meta-data get "tag-version" --default "0.0.0-alpha-$(date +%Y%m%d%H%M%S)") + - TAG_VERSION=${TAG_VERSION/v/} + - sed 's/"version": "*"/"version": "${TAG_VERSION}"/g' package.json + agents: + queue: builder + plugins: + <<: *docker + thedyrt/git-commit#v0.3.0: + message: Auto version + user: + name: Widen Developers + email: widendev@widen.com diff --git a/package.json b/package.json index a9cf7037..46308759 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@widen/react-modal", - "version": "3.16.2", + "version": "1.0.0", "description": "Accessible modal dialog component for React.JS", "main": "./lib/index.js", "module": "./lib/index.js",