forked from wetpaintweb/seo-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-readme.sh
executable file
·38 lines (25 loc) · 1.11 KB
/
deploy-readme.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
#!/bin/bash
set -e
# Wordpress.org username
wordpressuser="wetpaintweb"
# Wordpress.org plugin slug
package="seo-editor"
echo "Pushing current README to WordPress.org"
version=`grep "Stable tag:" readme.txt | awk '{print $3}'`
echo "Checking out current trunk on Wordpress SVN"
svn co https://plugins.svn.wordpress.org/${package}/trunk /tmp/readme-${package}
echo "Copying in updated readme.txt"
cp "$(pwd)/readme.txt" /tmp/readme-${package}/readme.txt
echo "Commiting new README to Wordpress SVN trunk"
svn commit --username ${wordpressuser} -m"Updating README file" /tmp/readme-${package}
echo "Cleaning up trunk"
rm -rf /tmp/readme-${package}
echo "Checking out current ${version} version on Wordpress SVN"
svn co https://plugins.svn.wordpress.org/${package}/tags/${version} /tmp/readme-${package}
echo "Copying in updated readme.txt"
cp "$(pwd)/readme.txt" /tmp/readme-${package}/readme.txt
echo "Commiting new README to Wordpress SVN ${version} version"
svn commit --username ${wordpressuser} -m"Updating README file" /tmp/readme-${package}
echo "Cleaning up ${version} version"
rm -rf /tmp/readme-${package}
echo "Done"