forked from themeum/kirki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commit.sh
55 lines (49 loc) · 1.26 KB
/
commit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env bash
SVNMSG="${1//#/https\:\/\/github.com\/aristath\/kirki\/issues\/}"
# Create svn directory if it doesn't exist
if [ ! -d "./svn" ]; then
mkdir svn
svn co https://plugins.svn.wordpress.org/kirki svn
fi
# commit & push to git
git add .
git commit -a -m "$1"
git push origin develop
# Copy files to SVN directory
rm -rf ../svncopytemp
cp -r . ../svncopytemp
rm -rf ../svncopytemp/svn
rm -rf svn/trunk
cp -r ../svncopytemp svn/trunk
rm -rf ../svncopytemp
# Cleanup files in trunk
rm -rf svn/trunk/.git
rm -rf svn/trunk/.github
rm -rf svn/trunk/assets/scss/
rm -rf svn/trunk/vendor/
rm -rf svn/trunk/node_modules
rm -rf svn/trunk/.sass-cache
rm -rf svn/trunk/tests
rm -f svn/trunk/*.sh
rm -f svn/trunk/.codeclimate.yml
rm -f svn/trunk/.coveralls.yml
rm -f svn/trunk/.csslintrc
rm -f svn/trunk/.editorconfig
rm -f svn/trunk/.gitignore
rm -f svn/trunk/.jscsrc
rm -f svn/trunk/.jshintignore
rm -f svn/trunk/.jshintrc
rm -f svn/trunk/.simplecov
rm -f svn/trunk/.travis.yml
rm -f svn/trunk/Gruntfile.js
rm -f svn/trunk/composer.json
rm -f svn/trunk/package.json
rm -f svn/trunk/phpunit.xml
rm -f svn/trunk/phpcs.ruleset.xml
rm -f svn/trunk/README.md
# commit to SVN
cd svn
svn rm $( svn status | sed -e '/^!/!d' -e 's/^!//' )
svn add trunk/* --force
svn ci -m "$SVNMSG"
cd ..