mirror of
https://github.com/primer/css.git
synced 2024-11-13 08:04:16 +03:00
chore: delete script/publish 🔥
This commit is contained in:
parent
739c3422aa
commit
e016e8bf6c
@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ -z $GITHUB_REF ]]; then
|
||||
echo "[publish] GITHUB_REF is not set; bailing"
|
||||
exit
|
||||
fi
|
||||
|
||||
name=$(cat package.json | npx fx .name)
|
||||
branch="${GITHUB_REF/refs\/heads\//}"
|
||||
sha="${GITHUB_SHA:0:7}"
|
||||
|
||||
echo "[publish] $name (branch: '$branch', sha: '$sha')"
|
||||
|
||||
flags="--dry-run"
|
||||
if [[ $branch = "master" ]]; then
|
||||
version=$(cat package.json | npx fx .version)
|
||||
if [[ $(npm view "$name@$version") = $version ]]; then
|
||||
echo "[publish] $name@$version is already published; bailing"
|
||||
exit
|
||||
else
|
||||
echo "[publish] here we go!"
|
||||
fi
|
||||
elif [[ $branch =~ ^release- ]]; then
|
||||
npm version "${branch/release-/}-pre.$sha"
|
||||
flags="$flags --tag next"
|
||||
else
|
||||
npm version "0.0.0-alpha.$sha"
|
||||
flags="$flags --tag canary"
|
||||
fi
|
||||
|
||||
npm --unsafe-perms publish $flags
|
Loading…
Reference in New Issue
Block a user