Build: Introduce shellcheck (#18081)
* Build: introduce shellcheck Fixes #16198
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user