Created
September 21, 2017 06:47
-
-
Save xcatliu/7fe29851f420d9b5fcd3c0cf348fec9a to your computer and use it in GitHub Desktop.
Run scripts in a period of history version of a repo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
start="2017-07-01" | |
end="2017-08-01" | |
endNextDay=`date -d "$end next-day" +%Y-%m-%d` | |
current=$start | |
while [ "$current" != "$endNextDay" ] | |
do | |
echo "Checking out git to $current" | |
next=`date -d "$current next-day" +%Y-%m-%d` | |
git checkout `git rev-list -n 1 --before="$next 00:00:00" master` | |
# Run a script in this version | |
# echo "Running cqc and output to scripts/cqc/archives/$current-js.json" | |
# cqc "src/**/*.js" "src/**/*.jsx" --ignore-path ../.eslintignore -f json > scripts/cqc/archives/$current-js.json | |
current=$next | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment