Build: Introduce shellcheck (#18081)

* Build: introduce shellcheck

Fixes #16198
This commit is contained in:
Oleg Gaidarenko
2019-07-23 13:12:33 +03:00
committed by GitHub
parent 87a794fe0a
commit 4b16cd6cc8
28 changed files with 161 additions and 156 deletions
+4 -6
View File
@@ -12,7 +12,7 @@ function prapare_version_commit () {
}
#Get current version from lerna.json
PACKAGE_VERSION=`grep '"version"' lerna.json | cut -d '"' -f 4`
PACKAGE_VERSION=$(grep '"version"' lerna.json | cut -d '"' -f 4)
# Get short current commit's has
GIT_SHA=$(parse_git_hash)
@@ -20,16 +20,14 @@ echo "Commit: ${GIT_SHA}"
echo "Current lerna.json version: ${PACKAGE_VERSION}"
# check if there were any changes to packages between current and previous commit
count=`git diff HEAD~1..HEAD --name-only -- packages | awk '{c++} END {print c}'`
count=$(git diff HEAD~1..HEAD --name-only -- packages | awk '{c++} END {print c}')
if [ -z $count ]; then
if [ -z "$count" ]; then
echo "No changes in packages, skipping packages publishing"
else
echo "Changes detected in ${count} packages"
echo "Releasing packages under ${PACKAGE_VERSION}-${GIT_SHA}"
npx lerna version ${PACKAGE_VERSION}-${GIT_SHA} --no-git-tag-version --no-push --force-publish -y
npx lerna version "${PACKAGE_VERSION}-${GIT_SHA}" --no-git-tag-version --no-push --force-publish -y
echo $'\nGit status:'
git status -s