Skip to content

Commit 50bc89f

Browse files
committed
Merge branch 'develop'
2 parents 41093de + 474ce37 commit 50bc89f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+392
-346
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ target
1414
out
1515
proguard.cfg
1616
proguard-project.txt
17-
build
17+
build/
1818
.gradle
1919
gradle-app.setting
2020
gradle.properties

BUILDING.md

+23-30
Original file line numberDiff line numberDiff line change
@@ -54,38 +54,28 @@ $ hugo server -w
5454

5555
You then preview the site at [http://localhost:1313]( http://localhost:1313)
5656

57-
### Compile HTML files
57+
## Release checklist
58+
These are guidelines to follow when you're about to make a release.
59+
### Prepare
60+
- [ ] Set release date and notify relevant stakeholders.
61+
- [ ] Write changelog.
62+
- [ ] Make sure the relevant play store release info has been updated. Look inside `play/en-US` folder.
63+
Usually you update this with the changelog entries for the version to be released.
64+
- [ ] Make sure changelog.json is updated and it validates. Use [jsonlint](http://jsonlint.com/) to validate the file.
65+
- [ ] Request for design asset if needed.
66+
- [ ] Draft a release announcement.
67+
- [ ] Make sure documentation on the website is updated to reflect any feature additions or changes in
68+
the release.
69+
- [ ] Make a local preview of the website to make sure nothing is broken. Refer to [How To Build SMSSync website above](#how-to-build-smssync-website).
70+
71+
### Release
72+
- [ ] Increase the 'versionCode' number in `smssync/build.gradle`
73+
- [ ] Issue the `./release.sh` command to make a release. This command has automated a lot of the release process.
74+
- [ ] Attach the release APK to the release tag on github. In the future this will be automated.
5875

59-
Compile the ruhoh site to HTML so it can be published to a hosting server. We use github pages to host SMSSync's website.
60-
61-
```
62-
$ cd website-src
63-
64-
$ bundle exec ruhoh compile '<path_to_a_folder_to_compile_the_html_into>'
65-
66-
```
67-
68-
**Note:** The folder to compile the html files into has to be empty as the `ruhoh compile` command will delete any files in it.
69-
70-
### Publish compiled HTML files
71-
72-
Publish the compiled HTML files to [github pages](http://ushahidi.github.io/SMSSync/)
73-
74-
```
75-
$ cd website-src/public
76-
77-
$ git init .
78-
79-
$ git add .
80-
81-
$ git commit -m "<update_message>"
82-
83-
$ git push [email protected]:ushahidi/SMSSync.git master:gh-pages --force
84-
85-
```
8676
## Release Build
8777

88-
To make a release make sure you have `gradle.properties` in the root of the `app` module with the
78+
To make a release make sure you have `gradle.properties` in the root of `smssync` folder with the
8979
following content.
9080

9181
**gradle.properties**
@@ -119,4 +109,7 @@ Then in the project's root directory, issue:
119109
`./release major milestone alpha`
120110

121111
This should build the app, version it, create a tag and push it to the remote repo and publish
122-
to the Google Playstore's alpha track.
112+
it to the Google Playstore's alpha track.
113+
114+
Note: always update the relevant stage and track for the release. Issue `./release` to know more
115+
about the valid options for the release command.

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Welcome to **"SMSSync"**, an android application that turns your android powered
66

77
Read about it at **[smssync.ushahidi.com](http://smssync.ushahidi.com/)**.
88

9+
---
10+
<a href="http://smssync.ushahidi.com/screenshots/"><img src="http://smssync.ushahidi.com/images/screenshots/settings.png" width="155px" height="272px" alt="Settings " title="Settings"></a> <a href="http://smssync.ushahidi.com/screenshots/"><img src="http://smssync.ushahidi.com/images/screenshots/pending_messages.png" width="155px" height="272px" alt="Pending Messages" title="Pending Messages"></a> <a href="http://smssync.ushahidi.com/screenshots/"><img src="http://smssync.ushahidi.com/images/screenshots/log.png" width="155px" height="272px" alt="Logs" title="Logs"></a>
11+
---
12+
13+
[![F-Droid](https://raw.githubusercontent.com/ushahidi/SMSSync/develop/art/f-droid-badge.png)](https://f-droid.org/repository/browse/?fdid=org.addhen.smssync "F-Droid Store") [![GitHub](https://raw.githubusercontent.com/ushahidi/SMSSync/develop/art/github-badge.png)](https://github.com/ushahidi/SMSSync/releases "GitHub Releases") [![Playstore](https://raw.githubusercontent.com/ushahidi/SMSSync/develop/art/playstore-badge.png)](https://play.google.com/store/apps/details?id=org.addhen.smssync "Google Playstore")
14+
915
## Installation
1016

1117
Installation and configuration details are [here][1].

art/f-droid-badge.png

5.88 KB
Loading

art/github-badge.png

12.5 KB
Loading

art/playstore-badge.png

9.39 KB
Loading

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ buildscript {
2121
jcenter()
2222
}
2323
dependencies {
24-
classpath 'com.android.tools.build:gradle:1.2.2'
24+
classpath 'com.android.tools.build:gradle:1.2.3'
2525
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
2626
classpath 'com.github.triplet.gradle:play-publisher:1.0.4'
2727
classpath 'org.ajoberstar:gradle-git:1.1.0'

changelog.json

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
[
2+
{
3+
"version": "v2.8.1",
4+
"date": "5th June, 2015",
5+
"features": [],
6+
"bugs": [
7+
"Fixed Navigation drawer. Items not showing on older devices.",
8+
"Fixed alert code sending wrong info when querying for battery level."
9+
]
10+
},
211
{
312
"version": "v2.8.0",
413
"date": "4th May, 2015",

contributors.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "List of contributors to the SMSSync project",
33
"note": "Sorted by last name",
4-
"total": 16,
4+
"total": 17,
55
"contributors": [
66
{
77
"name": "Milan Andric",
@@ -200,6 +200,17 @@
200200
"latitude": 52.29778,
201201
"longitude": 104.29639
202202
}
203+
},
204+
{
205+
"name": "Kirk Saviour Agbenyegah",
206+
"email": "[email protected]",
207+
"website": "",
208+
"description": "Bug fixes",
209+
"country": {
210+
"name": "Ghana",
211+
"latitude": 5.5500,
212+
"longitude": 0.2000
213+
}
203214
}
204215
]
205216
}

release.sh

+1-25
Original file line numberDiff line numberDiff line change
@@ -39,32 +39,8 @@ echo "Building a release apk"
3939

4040
./gradlew release -Prelease.scope=$SCOPE -Prelease.stage=$STAGE -PuploadTrack=$TRACK
4141

42-
# Compile HTML files
43-
44-
# cd into the website folder
45-
echo "Compiling website"
46-
47-
pushd website-src
48-
49-
hugo -d $TMP_DIR
50-
51-
popd
52-
53-
pushd $TMP_DIR
54-
git init
55-
56-
git add .
57-
58-
git commit -m "Updating webiste..."
59-
60-
git push [email protected]:ushahidi/SMSSync.git master:gh-pages --force
61-
62-
popd
63-
64-
echo "Website update done"
65-
6642
# Checkout develop branch
6743
echo "Checking out develop branch..."
6844
git checkout $DEVELOP
6945

70-
echo "Done!"
46+
echo "Done!"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
~ Copyright (c) 2010 - 2015 Ushahidi Inc
3+
~ All rights reserved
4+
~ Contact: [email protected]
5+
~ Website: http://www.ushahidi.com
6+
~ GNU Lesser General Public License Usage
7+
~ This file may be used under the terms of the GNU Lesser
8+
~ General Public License version 3 as published by the Free Software
9+
~ Foundation and appearing in the file LICENSE.LGPL included in the
10+
~ packaging of this file. Please review the following information to
11+
~ ensure the GNU Lesser General Public License version 3 requirements
12+
~ will be met: http://www.gnu.org/licenses/lgpl.html.
13+
~
14+
~ If you have questions regarding the use of this file, please contact
15+
~ Ushahidi developers at [email protected].
16+
-->
17+
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
18+
<string name="app_name">SMSsync - Debug</string>
19+
</resources>

smssync/build.gradle

+14-7
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,16 @@ android {
112112
}
113113

114114
defaultConfig {
115-
versionCode 32
116-
versionName "2.8.0"
115+
versionCode 33
116+
versionName "2.8.1"
117117
minSdkVersion 8
118118
targetSdkVersion 22
119119
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
120-
def publicKey = project.hasProperty('inAppPurchasePubKey') ? inAppPurchasePubKey : '';
121-
120+
def publicKey = project.hasProperty('inAppPurchasePubKey') ? inAppPurchasePubKey :
121+
'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAogSL6I/lnQ0bVEEwttOu8CmrZvZzkTrFcsLiHjeb6Sw01+i8nTNW70QsTe1U2Hg4ELv3Hrm0Vt5gyQL2r9V4h8IWhbGNlHPAWJFP/dUgbwYFBUsJ4SSOS4N2kN9FER0mWwZ90boulNaHd8g8AQkwaBAzsNL5w+uij4hfZ9AsAO/rdhqXkAQeV6ykVgW0Q9qoWTcPg0ly7lOtxMmnvPFnrPXTt/SyoZEmNE5j02sh0eDdyGR5hEc16ZcMM2tvndRomfi+aYeswguZf3V+J+fAcXiBiX4Q81356g+nFJfMUxu8D7o0ZDPSS2u4FW79QhRjWzijJ/4EIw4TQ1jtKBapgwIDAQAB';
122+
if (!project.hasProperty('inAppPurchasePubKey')) {
123+
println 'Missing inAppPurchasePubKey. Using the default from SMSsync project'
124+
}
122125
buildConfigField "String", "PUBLIC_LICENSE_KEY", '"' + publicKey + '"'
123126
}
124127

@@ -148,18 +151,22 @@ android {
148151
productFlavors {
149152

150153
withAnalytics {
151-
flavorDimension "analytics"
154+
dimension "analytics"
152155
}
153156

154157
noAnalytics {
155-
flavorDimension "analytics"
158+
dimension "analytics"
156159
}
157160
}
158161

159162
dexOptions {
160163
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
161164
preDexLibraries = preDexEnabled && !isTravis
162165
}
166+
167+
packagingOptions {
168+
exclude 'LICENSE.txt'
169+
}
163170
}
164171

165172
release {
@@ -202,7 +209,7 @@ tasks.release.dependsOn(['build', 'publishApkWithAnalyticsRelease'])
202209

203210
// Build and launch app from command line
204211
task runApp(type: Exec, dependsOn: ['build', 'installWithAnalyticsDebug']) {
205-
//Linux command to launch the PostActivity when debug app is installed
212+
//Linux command to launch the MainActivity when debug app is installed
206213
commandLine 'adb', 'shell', 'am', 'start', '-n',
207214
'org.addhen.smssync.debug/org.addhen.smssync.activities.MainActivity'
208215
}

smssync/src/androidTest/java/org/addhen/smssync/tests/models/SmssyncResponseTest.java

+19-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public class SmssyncResponseTest extends BaseTest {
6060
+ " }\n"
6161
+ "}";
6262

63+
private final String TASK_JSON_STRING
64+
= "{\"payload\":{\"task\":\"send\",\"secret\":\"coconut\",\"messages\":[{\"to\":\"+XXXXXXXX\",\"message\":\"from couch to you homes\",\"uuid\":\"aeefa9195f734d32b7e0f9d62d327f6d\"}]}}";
65+
6366
private Gson mGson;
6467

6568
private SmssyncResponse mSmssyncResponse;
@@ -68,7 +71,6 @@ public class SmssyncResponseTest extends BaseTest {
6871
public void setUp() throws Exception {
6972
super.setUp();
7073
mGson = new Gson();
71-
7274
}
7375

7476
@SmallTest
@@ -97,4 +99,20 @@ public void testShouldDeserializeSmsResponseWithNoMessage() throws Exception {
9799
assertNull(mSmssyncResponse.getPayload().getMessages());
98100
System.out.println("messages:" + mSmssyncResponse.toString());
99101
}
102+
103+
@SmallTest
104+
public void testShouldSerializeTaskResponseWithNoSuccessProperty() throws Exception {
105+
mSmssyncResponse = mGson.fromJson(TASK_JSON_STRING, SmssyncResponse.class);
106+
assertNotNull(mSmssyncResponse);
107+
assertNotNull(mSmssyncResponse.getPayload());
108+
assertEquals("send", mSmssyncResponse.getPayload().getTask());
109+
assertEquals("coconut", mSmssyncResponse.getPayload().getSecret());
110+
assertNotNull(mSmssyncResponse.getPayload().getMessages());
111+
assertEquals("+XXXXXXXX",
112+
mSmssyncResponse.getPayload().getMessages().get(0).getPhoneNumber());
113+
assertEquals("from couch to you homes",
114+
mSmssyncResponse.getPayload().getMessages().get(0).getBody());
115+
assertEquals("aeefa9195f734d32b7e0f9d62d327f6d",
116+
mSmssyncResponse.getPayload().getMessages().get(0).getUuid());
117+
}
100118
}

0 commit comments

Comments
 (0)