Update
This commit is contained in:
@ -1,13 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
git-pull() {
|
||||
name=$1
|
||||
git config pull.rebase true
|
||||
git config rebase.autoStash true
|
||||
git pull --quiet
|
||||
ref=$(git log -1 --pretty='{"hash":"%H","date":"%aI","committer":"%cn","subject":"%s"}')
|
||||
yq -iP ".$name=$ref" ../../src/commits.json -o json
|
||||
}
|
||||
|
||||
pull() {
|
||||
echo "🚛 Pulling $2"
|
||||
if [ ! -d "packages/$2" ]; then
|
||||
echo "📦 Repository not found, cloning..."
|
||||
git clone "https://github.com/$1/$2.git" "packages/$2"
|
||||
fi
|
||||
(cd "packages/$2" && git config pull.rebase true && git config rebase.autoStash true && git pull)
|
||||
(cd "packages/$2" && git-pull "$2")
|
||||
echo
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user