Commit 13dbe70f by Han Su Kim

Merge pull request #1585 from edx/han/check-migrations

Fix check-migrations
parents f79b0890 008f39a2
...@@ -38,7 +38,7 @@ if [[ -z $syncdb ]]; then ...@@ -38,7 +38,7 @@ if [[ -z $syncdb ]]; then
fi fi
if [[ $db_dry_run == "false" ]]; then if [[ $db_dry_run == "false" ]]; then
# Set this to an empty string if db_dry_run is # Set this to an empty string if db_dry_run is
# not set. By default the db_dry_run var is # not set. By default the db_dry_run var is
# set to --db-dry-run # set to --db-dry-run
......
...@@ -54,17 +54,20 @@ repo_basename=$(basename "$repo") ...@@ -54,17 +54,20 @@ repo_basename=$(basename "$repo")
cd /var/tmp cd /var/tmp
if [[ ! -d $repo_basename ]]; then if [[ ! -d $repo_basename ]]; then
$noop git clone "$repo" "$repo_basename" --mirror $noop git clone "$repo" "$repo_basename" --mirror > /dev/null 2>&1
else else
$noop cd "/var/tmp/$repo_basename" $noop cd "/var/tmp/$repo_basename"
$noop git fetch $noop git fetch > /dev/null > /dev/null 2>&1
fi fi
$noop cd "/var/tmp/$repo_basename" $noop cd "/var/tmp/$repo_basename"
if [[ -z $noop ]]; then if [[ -z $noop ]]; then
for branch in $(git branch -a | sort -r | tr -d ' ' | grep -E "$filter" ); do for branch in $(git branch -a | sort -r | tr -d ' ' | grep -E "$filter" ); do
echo "origin/${branch}" echo "origin/${branch}"
done
for tag in $(git tag -l | sort -r | tr -d ' ' | grep -E "$filter"); do
echo "$tag"
done done
else else
echo "Would have checked for branches using filter $filter" echo "Would have checked for branches or tags using filter $filter"
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment