Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script silently includes extra changes if a repo has local changes #20

Open
foolip opened this issue Jun 29, 2020 · 1 comment
Open

Comments

@foolip
Copy link
Member

foolip commented Jun 29, 2020

whatwg/dom#877 includes lots of other changes, where I had a .spec.whatwg.org directory in my dom/ checkout, after a bug fixed in whatwg/whatwg.org#325.

The script should either fail if there are any local changes, or just make fresh copies of all repos. As it is, it assumes you have all repos checkout out alongside spec-factory, but how to keep those up-to-date is an exercise for the reader. Here's the script I've arrived at over time:

#!/bin/bash -e

curl --silent --fail "https://api.github.com/orgs/whatwg/repos?per_page=100" | \
    #grep -E '^    "name":' | cut -d \" -f4 | \
    #grep -vE '^(domparsing|javascript|old-google-code-html5|resources.whatwg.org)$' | \
    jq -r '.[] | select(.archived == false) | .name' | sort | \
    while read name; do
        if [[ -d "$name" ]]; then
            echo "Updating $name"
            (
                cd "$name"
                git fetch --prune
                git rebase-update --no-fetch --keep-going
            )
        else
            echo "Cloning $name"
            git clone "[email protected]:whatwg/$name.git"
        fi
    done

It would be good if it just works instead.

@annevk
Copy link
Member

annevk commented Jun 29, 2020

It emulates https://github.com/whatwg/whatwg.org/blob/381944022adf44dfd45d0c03c38b33ba087b72a2/resources.whatwg.org/build/review.sh#L19-L21 at the moment. There are indeed a number of ways that can fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants