367117e857
* Publish native packages publicly * Remove unnecessary await * Use --no-git-reset lerna option Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
38 lines
815 B
Bash
Executable file
38 lines
815 B
Bash
Executable file
#!/bin/bash
|
|
|
|
git describe --exact-match
|
|
|
|
if [[ ! $? -eq 0 ]];then
|
|
echo "Nothing to publish, exiting.."
|
|
exit 0;
|
|
fi
|
|
|
|
if [[ -z "$NPM_TOKEN" ]];then
|
|
echo "No NPM_TOKEN, exiting.."
|
|
exit 0;
|
|
fi
|
|
|
|
if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];
|
|
then
|
|
echo "Publishing canary"
|
|
yarn run lerna publish from-git --npm-tag canary --no-git-reset --yes
|
|
|
|
# Make sure to exit script with code 1 if publish failed
|
|
if [[ ! $? -eq 0 ]];then
|
|
exit 1;
|
|
fi
|
|
else
|
|
echo "Did not publish canary"
|
|
fi
|
|
|
|
if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then
|
|
echo "Publishing stable"
|
|
yarn run lerna publish from-git --no-git-reset --yes
|
|
|
|
# Make sure to exit script with code 1 if publish failed
|
|
if [[ ! $? -eq 0 ]];then
|
|
exit 1;
|
|
fi
|
|
else
|
|
echo "Did not publish stable"
|
|
fi
|