Skip to content

Commit 6d71fb4

Browse files
author
Benjamin Pick
committed
Deploy beta versions to beta branch
1 parent 62f84ff commit 6d71fb4

File tree

2 files changed

+50
-13
lines changed

2 files changed

+50
-13
lines changed

CONTRIBUTING.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Depending on your skill and interests, here is what you can give:
55
1. Code
66
2. Documentation
77
3. Support
8+
4. Beta-Testing
89
4. Translation
910
5. Donation
1011

@@ -26,13 +27,19 @@ The documentation of PHP function is copied out of the code. If you want to modi
2627

2728
If you need inspiration of what needs better documenting, look at the [support forum](https://wordpress.org/support/plugin/geoip-detect/). Hint: You can start with the things that you were stuck yourself when you started using the plugin, most probably others will learn from it.
2829

29-
## 3. Support
30+
## 3. Beta-Testing
31+
32+
Beta for me means "I *think* I'm finished, but ..." - often some errors only appear in a certain environment, or I have forgotten to support some edge case / options combination.
33+
So it would be great if you can install the beta version in your development and tell me if everything works, especially the features that have changed recently!
34+
How? See [Beta Testing](https://github.com/yellowtree/geoip-detect/wiki/Beta_Testing)
35+
36+
## 4. Support
3037

3138
Go to the [support forum](https://wordpress.org/support/plugin/geoip-detect/) and check for [unresolved (esp. un-replied)](https://wordpress.org/support/plugin/geoip-detect/unresolved/) threads. If you can answer the question, please do so! I probably would have replied also at some point, but maybe only weeks later. The questions range from beginner to very-techical, so I'm sure if you are an active user of the plugin, some question can be replied by you.
3239

3340
You can subscribe to the forum by clicking on the `Subscribe` button on the top - BTW I have subscribed to the forum so I will see all requests and your replies as well. So don't worry, if I don't agree with you for some reason I will explain why ;-)
3441

35-
## 4. Translation
42+
## 5. Translation
3643

3744
I am maintaining the German translation of the plugin. If you want to translate the plugin UI into your own mother-tongue, here is how you do it:
3845

@@ -42,7 +49,7 @@ I am maintaining the German translation of the plugin. If you want to translate
4249
* Then [submit a so-called PTE request](https://make.wordpress.org/polyglots/handbook/plugin-theme-authors-guide/pte-request/#sample-translation-reviewpte-request-by-a-plugintheme-author)
4350
* After each plugin update, there might be a few plugin strings changed. So from time to time, please check these "Fuzzy" or "Untranslated" strings
4451

45-
## 5. Donation
52+
## 6. Donation
4653

4754
This plugin is [charity-ware](https://github.com/yellowtree/geoip-detect/wiki/FAQ#what-do-you-mean-by-this-plugin-is-charity-ware):
4855

deploy.sh

+40-10
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,37 @@ echo ".........................................."
3838
echo
3939

4040
# Check version in readme.txt is the same as plugin file
41-
#NEWVERSION1=`grep "^Stable tag" $GITPATH/readme.txt | awk -F' ' '{print $3}'`
42-
#echo "readme version: $NEWVERSION1"
43-
NEWVERSION2=`grep "^Version" $GITPATH/$MAINFILE | awk -F' ' '{print $2}'`
44-
NEWVERSION="$NEWVERSION2"
41+
NEWVERSION=`grep "^Version" $GITPATH/$MAINFILE | awk -F' ' '{print $2}'`
42+
echo "$MAINFILE version: $NEWVERSION"
43+
NEWVERSION2=`grep "^define.*GEOIP_DETECT_VERSION" $GITPATH/$MAINFILE | awk -F"'" '{print $4}'`
44+
echo "$MAINFILE define version: $NEWVERSION"
4545

46-
echo "$MAINFILE version: $NEWVERSION2"
47-
NEWVERSION3=`grep "^define.*GEOIP_DETECT_VERSION" $GITPATH/$MAINFILE | awk -F"'" '{print $4}'`
48-
echo "$MAINFILE define version: $NEWVERSION3"
49-
50-
# if [ "$NEWVERSION1" != "$NEWVERSION2" ] || [ "$NEWVERSION1" != "$NEWVERSION3" ]; then echo "Versions don't match. Exiting...."; exit 1; fi
51-
if [ "$NEWVERSION2" != "$NEWVERSION3" ]; then echo "Versions don't match. (php: '$NEWVERSION2', define: '$NEWVERSION3') Exiting...."; exit 1; fi
46+
if [ "$NEWVERSION" != "$NEWVERSION2" ]; then echo "Versions don't match. (php: '$NEWVERSION', define: '$NEWVERSION2') Exiting...."; exit 1; fi
5247

5348
echo "Versions match in PHP file. Let's proceed..."
5449

50+
if [[ $NEWVERSION == *"beta"* ]]; then BETA=1
51+
if [ "$1" = "beta" ] ; then BETA=1
52+
if [ "$BETA" = "1" ] ; then
53+
echo
54+
echo "Release Beta version only"
55+
echo
56+
fi
57+
58+
function merge() {
59+
local MERGE_FROM = $1
60+
local MERGE_TO = $2
61+
62+
echo "Merging $MERGE_FROM into $MERGE_TO ..."
63+
git checkout "$MERGE_TO" && git merge --strategy=fast-forward "$MERGE_FROM"
64+
if [ $? != 0 ]; then
65+
echo "No merge possible with fast-forward, please merge $MERGE_FROM into $MERGE_TO manually ..."
66+
exit 1;
67+
fi
68+
}
69+
70+
merge develop beta
71+
5572
#echo "Compressing JS files..."
5673
#java -jar ~/bin/yuicompressor.jar --nomunge --preserve-semi -o "$GITPATH/tinymce/editor_plugin.js" $GITPATH/tinymce/editor_plugin_src.js
5774
#java -jar ~/bin/yuicompressor.jar --nomunge --preserve-semi -o "$GITPATH/tinymce/wpcf-select-box.js" $GITPATH/tinymce/wpcf-select-box_src.js
@@ -79,10 +96,22 @@ git commit -am "$COMMITMSG"
7996
echo "Tagging new version in git"
8097
git tag -a "$NEWVERSION" -m "Tagging version $NEWVERSION"
8198

99+
merge beta develop
100+
101+
if [ "$BETA" = 1 ] then
102+
git checkout develop
103+
echo "Beta version released."
104+
exit 0;
105+
fi
106+
107+
merge beta master
108+
82109
echo "Pushing latest commit to origin, with tags"
83110
git push origin --all
84111
git push origin master --tags
85112

113+
# ---------------------- now updating SVN -----------------------
114+
86115
echo
87116
echo "Creating local copy of SVN repo ..."
88117
svn co $SVNURL -N $SVNPATH
@@ -136,5 +165,6 @@ svn commit --username=$SVNUSER -m "Tagging version $NEWVERSION"
136165
echo "Removing temporary directory $SVNPATH"
137166
rm -fr $SVNPATH/
138167

168+
git checkout develop
139169
echo "*** FIN ***"
140170

0 commit comments

Comments
 (0)