Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
4ef84b3c
Commit
4ef84b3c
authored
Feb 21, 2016
by
Daniel Agar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
google play upload add release track arg
-set as beta for now
parent
3b25a5d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
.travis.yml
.travis.yml
+1
-1
google_play_upload.py
tools/google_play_upload.py
+8
-5
No files found.
.travis.yml
View file @
4ef84b3c
...
...
@@ -126,7 +126,7 @@ after_success:
-
if [[ "${TRAVIS_OS_NAME}" = "android" && "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then
pip install --user google-api-python-client PyOpenSSL
&& cd ${TRAVIS_BUILD_DIR} && openssl aes-256-cbc -K $encrypted_25db6eb7c3fd_key -iv $encrypted_25db6eb7c3fd_iv -in ${TRAVIS_BUILD_DIR}/android/Google_Play_Android_Developer-4432a3c4f5d1.json.enc -out android/Google_Play_Android_Developer-4432a3c4f5d1.json -d
&& ${TRAVIS_BUILD_DIR}/tools/google_play_upload.py org.mavlink.qgroundcontrol ${SHADOW_BUILD_DIR}/release/package/qgroundcontrol.apk
&& ${TRAVIS_BUILD_DIR}/tools/google_play_upload.py
beta
org.mavlink.qgroundcontrol ${SHADOW_BUILD_DIR}/release/package/qgroundcontrol.apk
;
fi
...
...
tools/google_play_upload.py
View file @
4ef84b3c
...
...
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Uploads an apk to the
beta track
."""
"""Uploads an apk to the
google play store
."""
import
argparse
...
...
@@ -23,15 +23,16 @@ import httplib2
from
oauth2client
import
client
from
oauth2client.service_account
import
ServiceAccountCredentials
TRACK
=
'beta'
# Can be 'alpha', beta', 'production' or 'rollout'
JSON_KEY
=
'android/Google_Play_Android_Developer-4432a3c4f5d1.json'
# Declare command-line flags.
argparser
=
argparse
.
ArgumentParser
(
add_help
=
False
)
argparser
.
add_argument
(
'package_name'
,
argparser
.
add_argument
(
'release_track'
,
choices
=
[
'alpha'
,
'beta'
,
'production'
,
'rollout'
],
help
=
'Google play track. Can be alpha, beta, production or rollout'
)
argparser
.
add_argument
(
'package_name'
,
help
=
'The package name. Example: com.android.sample'
)
argparser
.
add_argument
(
'apk_file'
,
nargs
=
'?'
,
default
=
'qgroundcontrol.apk'
,
help
=
'The path to the APK file to upload.'
)
...
...
@@ -51,10 +52,12 @@ def main():
# Process flags and read their values.
flags
=
argparser
.
parse_args
()
release_track
=
flags
.
release_track
package_name
=
flags
.
package_name
apk_file
=
flags
.
apk_file
try
:
print
'Uploading package
%
s to track
%
s'
%
(
package_name
,
release_track
)
edit_request
=
service
.
edits
()
.
insert
(
body
=
{},
packageName
=
package_name
)
result
=
edit_request
.
execute
()
edit_id
=
result
[
'id'
]
...
...
@@ -68,7 +71,7 @@ def main():
track_response
=
service
.
edits
()
.
tracks
()
.
update
(
editId
=
edit_id
,
track
=
TRACK
,
track
=
release_track
,
packageName
=
package_name
,
body
=
{
u'versionCodes'
:
[
apk_response
[
'versionCode'
]]})
.
execute
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment