space-accessstablestagetest-hooks
Last change
on this file since 68c93e8 was
c060d8c,
checked in by Alex Dehnert <adehnert@…>, 14 years ago
|
Use fixtures for categories, and track changes
- Remove the old import_categories.py script, and associated
legacy-categories.txt file
- Add fixtures for:
- Creating the groups.ActivityCategory? objects (formerly the role of the
import_categories.py script, see above)
- Creating the forms.FYSMCategory objects (formerly done by hand)
- Diff those fixtures in the diff_static_data.sh script
This partially fixes Trac #29 and fixes Trac #30.
|
-
Property mode set to
100755
|
File size:
845 bytes
|
Rev | Line | |
---|
[728cafa] | 1 | #!/bin/bash -e |
---|
| 2 | |
---|
| 3 | author="$USER diff_static_data.sh on $(hostname) <asa-db@mit.edu>" |
---|
| 4 | |
---|
| 5 | date |
---|
| 6 | |
---|
| 7 | cd static-data |
---|
| 8 | |
---|
| 9 | ../dump_group_perms.py > group-perms.py |
---|
| 10 | git add group-perms.py |
---|
| 11 | |
---|
[c060d8c] | 12 | ../../manage.py dumpdata --format=xml --indent=4 groups.ActivityCategory > groups_initial_data.xml |
---|
| 13 | ../../manage.py dumpdata --format=xml --indent=4 forms.FYSMCategory > forms_initial_data.xml |
---|
| 14 | git add {groups,forms}_initial_data.xml |
---|
[728cafa] | 15 | |
---|
| 16 | echo |
---|
[1f4cc3c] | 17 | echo Committing current static data: |
---|
| 18 | set +e |
---|
| 19 | git commit -m "Updated static data: $(date +%F)" --author="$author" |
---|
| 20 | commit_result="$?" |
---|
| 21 | set -e |
---|
| 22 | |
---|
| 23 | if [ "$commit_result" = "0" ]; then |
---|
| 24 | echo |
---|
| 25 | echo Changes in this commit: |
---|
| 26 | git show |
---|
| 27 | else |
---|
| 28 | echo "(No changes made.)" |
---|
| 29 | fi |
---|
[728cafa] | 30 | |
---|
| 31 | echo |
---|
| 32 | echo |
---|
| 33 | echo Disk usage: |
---|
| 34 | du -h --max-depth=1 |
---|
| 35 | |
---|
| 36 | echo |
---|
| 37 | echo "gc'ing..." |
---|
| 38 | time git gc |
---|
| 39 | echo "repack'ing..." |
---|
| 40 | time git repack |
---|
| 41 | |
---|
| 42 | echo |
---|
| 43 | echo Disk usage: |
---|
| 44 | du -h --max-depth=1 |
---|
| 45 | |
---|
| 46 | date |
---|
Note: See
TracBrowser
for help on using the repository browser.