File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ PACKAGES_DIR=" ./packages"
6+ export GIT_PAGER=cat
7+ IGNORED_DIRS=(" browser" " wxt-demo" )
8+
9+ if [ ! -d " $PACKAGES_DIR " ]; then
10+ echo " Error: Directory '$PACKAGES_DIR ' not found."
11+ exit 1
12+ fi
13+
14+ echo " Checking for changes in packages since their last tag..."
15+ echo " "
16+
17+ for dir in " $PACKAGES_DIR " /* ; do
18+ if [ -d " $dir " ]; then
19+ pkg_name=$( basename " $dir " )
20+
21+ # Check if the package name is in the ignored directories list
22+ if [[ " ${IGNORED_DIRS[*]} " =~ " $pkg_name " ]]; then
23+ echo " Skipping ignored package: $pkg_name "
24+ continue # Skip to the next directory
25+ fi
26+
27+ echo " ----------------------------------------"
28+ echo " Package: $pkg_name "
29+
30+ # Find the latest tag for the package, e.g., "my-package-v1.2.3"
31+ # Sorts tags by version and picks the most recent one.
32+ last_tag=$( git tag --list " ${pkg_name} -v*" --sort=-v:refname | head -n 1)
33+
34+ if [ -n " $last_tag " ]; then
35+ # If a tag is found, show commits since that tag for the specific package directory
36+ echo " Commits since last tag ($last_tag ):"
37+ git log " ${last_tag} ..HEAD" --oneline -- " $dir "
38+ else
39+ # If no tag is found, show all commits for that package directory
40+ echo " No tags found for this package. Listing all commits:"
41+ git log --oneline -- " $dir "
42+ fi
43+ echo " "
44+ fi
45+ done
You can’t perform that action at this time.
0 commit comments