Révision 1c1c5a42
Ajouté par Julien Enselme il y a plus de 10 ans
.gitignore | ||
---|---|---|
2 | 2 |
*# |
3 | 3 |
.#* |
4 | 4 |
__* |
5 |
private/* |
|
6 |
sites/* |
|
7 |
backup/* |
|
8 |
log/* |
|
9 |
Maildir/* |
|
10 |
tmp/* |
|
11 |
Desktop/* |
|
12 |
html/* |
|
13 |
.* |
|
5 | 14 |
|
6 | 15 |
# Ignore Eclipse's files. |
7 | 16 |
/.project |
8 |
/.buildpath |
|
17 |
/.buildpath |
bin/d7-all-update-contrib.sh | ||
---|---|---|
1 | 1 |
#!/bin/sh |
2 | 2 |
|
3 | 3 |
. /users/guest/assos/bin/scripts-config.sh |
4 |
. /users/guest/assos/bin/scripts-utils.sh |
|
5 |
|
|
6 |
commit_if_unclean |
|
4 | 7 |
|
5 | 8 |
d7-all-drush.sh -y en update |
6 | 9 |
# Launch cron to check for updates. |
... | ... | |
14 | 17 |
d7-all-drush.sh -y dis update |
15 | 18 |
|
16 | 19 |
d7-all-drush.sh cron |
20 |
|
|
21 |
commit "Weekly update of contrib modules" |
bin/d7-create-site.sh | ||
---|---|---|
9 | 9 |
######## Exceptions |
10 | 10 |
check_arguments $# 1 "$help" |
11 | 11 |
|
12 |
if ! work_tree_clean ; then |
|
13 |
echo "Your work tree is not clean. Solve this before $0 can continue." |
|
14 |
exit 2 |
|
15 |
fi |
|
16 |
|
|
12 | 17 |
# "-" is forbidden because it provokes database error. |
13 | 18 |
if [ `echo $1 | grep -` ] ; then |
14 | 19 |
echo '"-" is forbidden in the site name' |
... | ... | |
98 | 103 |
echo "- Create a node of type \"Site\" on default" |
99 | 104 |
echo "- Register the webmaster on webmasters@listes.centrale-marseille.fr" |
100 | 105 |
echo -e "- If line to add to sites.php differs from the line below, please correct it\n\t$site_line_sites_php" |
106 |
|
|
107 |
commit "Creation of site: $d7_site_name" |
bin/d7-delete-site.sh | ||
---|---|---|
8 | 8 |
|
9 | 9 |
check_arguments $# 1 "$help" |
10 | 10 |
|
11 |
if ! work_tree_clean ; then |
|
12 |
echo "Your work tree is not clean. Solve this before $0 can continue." |
|
13 |
exit 2 |
|
14 |
fi |
|
15 |
|
|
11 | 16 |
db_password=`ask_password_db $db_server $db_user` |
12 | 17 |
|
13 | 18 |
echo 'Delete database.' |
... | ... | |
40 | 45 |
echo "Don't forget to:" |
41 | 46 |
echo "- Refresh node site on default" |
42 | 47 |
echo "- Check particular behavior (normally detailed on site node)" |
48 |
|
|
49 |
commit "Deletion of site: $d7_site_name" |
bin/git-report.sh | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
. /users/guest/assos/bin/scripts-config.sh |
|
4 |
. /users/guest/assos/bin/scripts-utils.sh |
|
5 |
|
|
6 |
if ! check_if_work_tree_clean ; then |
|
7 |
mail_unclean_work_tree "[git] WORK TREE UNCLEAN" |
|
8 |
fi |
|
9 |
|
|
10 |
git_log=`git log -p --after=yesterday` |
|
11 |
if [ -n $git_log ] ; then |
|
12 |
echo $git_log | mail -s "[git] Report" |
|
13 |
fi |
bin/scripts-utils.sh | ||
---|---|---|
76 | 76 |
settings_location=`realpath $1` |
77 | 77 |
echo `dirname $settings_location` |
78 | 78 |
} |
79 |
|
|
80 |
work_tree_clean() { |
|
81 |
git_status_output=`git status --porcelain` |
|
82 |
if [ -z $git_status_output ] ; then |
|
83 |
exit 0 |
|
84 |
else |
|
85 |
exit 1 |
|
86 |
fi |
|
87 |
} |
|
88 |
|
|
89 |
mail_unclean_work_tree() { |
|
90 |
cd $dir_multi_assos |
|
91 |
git_status_output=`git status` |
|
92 |
echo $git_status_output | mail -s $1 $email_multi_assos |
|
93 |
} |
|
94 |
|
|
95 |
commit_if_unclean() { |
|
96 |
if ! work_tree_clean ; then |
|
97 |
commit_message="COMMIT OF UNCLEAN STUFF" |
|
98 |
commit -a -m $commit_message |
|
99 |
mail_unclean_work_tree "[git] $commit_message" |
|
100 |
fi |
|
101 |
} |
|
102 |
|
|
103 |
commit() { |
|
104 |
# ARG: commit message |
|
105 |
if [ -z $1 ] ; then |
|
106 |
echo "Empty commit message. Nothing was commited." |
|
107 |
exit 2 |
|
108 |
fi |
|
109 |
cd $dir_multi_assos |
|
110 |
git commit -a -m $1 |
|
111 |
} |
Formats disponibles : Unified diff
Script support git as described #343 to implement #191