From ebac2836d0b8e4be753967ba6ca889b5103b8072 Mon Sep 17 00:00:00 2001 From: armab Date: Thu, 7 Jul 2016 19:31:21 +0300 Subject: [PATCH] Set PKG_RELEASE=1 number for forked PRs Avoid failing the build, because PACKAGECLOUD_TOKEN is not available Partially solves #47 --- circle.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index ace2a9c..deb2b76 100644 --- a/circle.yml +++ b/circle.yml @@ -34,7 +34,11 @@ checkout: distros=($DISTROS) DISTRO=${distros[$CIRCLE_NODE_INDEX]} PKG_VERSION=$(node -e "console.log(require('./package.json').st2_version);") - PKG_RELEASE=$(~/st2-packages/.circle/packagecloud.sh next-revision ${DISTRO} ${PKG_VERSION} st2chatops) + if [ -n "$PACKAGECLOUD_TOKEN" ]; then + PKG_RELEASE=$(~/st2-packages/.circle/packagecloud.sh next-revision ${DISTRO} ${PKG_VERSION} st2chatops) + else + PKG_RELEASE=1 + fi echo "export PKG_VERSION=${PKG_VERSION}" >> ~/.circlerc echo "export PKG_RELEASE=${PKG_RELEASE}" >> ~/.circlerc echo "export DISTRO=${DISTRO}" >> ~/.circlerc