From 1eb8e58e0e02acc3bf17c3b31a1c9f57ea4fd151 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sun, 7 Jan 2018 19:16:44 +0100 Subject: [PATCH] build: improve beta and alpha release --- circle.yml | 10 +++++++++- scripts/alpha-publish.sh | 10 ++++++++++ scripts/beta-publish.sh | 10 ++++++++++ scripts/publish.sh | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100755 scripts/alpha-publish.sh create mode 100755 scripts/beta-publish.sh diff --git a/circle.yml b/circle.yml index 6f45dff26..911171138 100644 --- a/circle.yml +++ b/circle.yml @@ -31,9 +31,17 @@ test: - yarn run test deployment: production: - tag: /.*?/ + tag: /(v)?[0-9]+(\.[0-9]+)*/ commands: - ./scripts/publish.sh + alpha-release: + tag: /.*-alpha.*/ + commands: + - ./scripts/alpha-publish.sh + beta-release: + tag: /.*-beta.*/ + commands: + - ./scripts/beta-publish.sh general: branches: ignore: diff --git a/scripts/alpha-publish.sh b/scripts/alpha-publish.sh new file mode 100755 index 000000000..dadaad1b7 --- /dev/null +++ b/scripts/alpha-publish.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Get the last tag from GitHub +lastTag=$(git describe --tags $(git rev-list --tags --max-count=1)) + +# Print it to the console for verification +echo "Bumping version to new tag: ${lastTag}" + +# Publish to NPM +npm publish --tag alpha diff --git a/scripts/beta-publish.sh b/scripts/beta-publish.sh new file mode 100755 index 000000000..4888ae472 --- /dev/null +++ b/scripts/beta-publish.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Get the last tag from GitHub +lastTag=$(git describe --tags $(git rev-list --tags --max-count=1)) + +# Print it to the console for verification +echo "Bumping version to new tag: ${lastTag}" + +# Publish to NPM +npm publish --tag beta diff --git a/scripts/publish.sh b/scripts/publish.sh index 4888ae472..1380a2126 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -7,4 +7,4 @@ lastTag=$(git describe --tags $(git rev-list --tags --max-count=1)) echo "Bumping version to new tag: ${lastTag}" # Publish to NPM -npm publish --tag beta +npm publish