浏览代码

Build: detect changes to packages based on the git diff (#18118)

Dominik Prokop 6 年之前
父节点
当前提交
88d9a3b440
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      scripts/circle-release-next-packages.sh

+ 4 - 2
scripts/circle-release-next-packages.sh

@@ -19,8 +19,10 @@ GIT_SHA=$(parse_git_hash)
 echo "Commit: ${GIT_SHA}"
 echo "Current lerna.json version: ${PACKAGE_VERSION}"
 
-# count packages that changed
-count=`npx lerna changed --loglevel silent | awk '{c++} END {print c}'`
+# 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}'`
+
+
 
 if [ -z $count ]; then
   echo "No changes in packages, skipping packages publishing"