Code Monkey home page Code Monkey logo

gota's Introduction

NO MAINTENANCE NOTICE

I don't maintain this repository anymore. Feel free to fork if needed.

About gota

Go Report Card GoDoc GitHub tag Total downloads

Automate the beta testing distribution of your Android and iOS application files.

gota is a just command line tool that you can easily integrate in your current continuous integration workflow with tools such as Fastlane.

gota automatically detects the build information of your ipa or apk files and creates an OTA (over the air) installation site that is uploaded to your desired hosting server.

Android iOS

Supported Static Hosting Service

  • Amazon S3 Bucket
  • Nexus 3 Site Repository
  • DigitalOcean Spaces
  • Standalone Gota Server
  • Nexus 2 Site Repository

Getting Started

Manual Installation

Get the executable binary for your platform from the Release Page.

Linux

# downloading via wget
wget https://github.com/bzon/gota/releases/download/0.1.6/gota-linux-amd64

# rename the executable
mv gota-linux-amd64 gota

# test gota
./gota --version

# command output
gota version v0.1.6 linux/amd64

Windows

# downloading via wget
wget https://github.com/bzon/gota/releases/download/0.1.6/gota-windows-amd64.exe

# rename the executable
mv gota-windows-amd64.exe gota.exe

# test gota
gota.exe --version

# command output
gota version v0.1.6 windows/amd64

OSX

# downloading via wget
wget https://github.com/bzon/gota/releases/download/0.1.6/gota-darwin-amd64

# rename the executable
mv gota-darwin-amd64 gota

# test gota
./gota --version

# command output
gota version v0.1.6 darwin/amd64

Go Installation

go get github.com/bzon/gota

Help Flags

To see the required flags, use the --help flag.

gota --help
gota nexus --help
gota s3 --help

Uploading to S3 Bucket

Set the AWS API key securely.

export AWS_ACCESS_KEY=xxxxx
export AWS_SECRET_ACCESS_KEY=xxxxx

Command input:

gota s3 --bucket example-s3-bucket --srcFile sample.ipa --destDir ios_bucket

Command output:

2018/04/30 01:12:37 file uploaded: https://example-s3-bucket.s3.amazonaws.com/ios_bucket/1.0.0/4/appicon.png
2018/04/30 01:12:37 file uploaded: https://example-s3-bucket.s3.amazonaws.com/ios_bucket/1.0.0/version.json
2018/04/30 01:12:37 file uploaded: https://example-s3-bucket.s3.amazonaws.com/ios_bucket/1.0.0/4/index.html
2018/04/30 01:12:37 file uploaded: https://example-s3-bucket.s3.amazonaws.com/ios_bucket/1.0.0/4/sample.ipa
2018/04/30 01:12:37 file uploaded: https://example-s3-bucket.s3.amazonaws.com/ios_bucket/1.0.0/4/app.plist

NOTE:

Currently, gota assigns an AES256 encryption and a public-read ACL to all files that are uploaded. This may change to be configurable in the future.

Uploading to Nexus

The repository must be a Raw Site Repository.

Set the Nexus credentials securely.

# set the nexus credentials
# this can also be set via command flags
export NEXUS_USER=admin
export NEXUS_PASSWORD=admin123

Command input:

gota nexus --nexusHost http://localhost:8081 \
            --nexusRepo site \
            --destDir nexus_android_repo \
            --srcFile build/outpus/apk/sample.apk

Command output:

file uploaded: http://localhost:8081/repository/site/nexus_android_repo/1.0.0/10222333/appicon.png
file uploaded: http://localhost:8081/repository/site/nexus_android_repo/1.0.0/version.json
file uploaded: http://localhost:8081/repository/site/nexus_android_repo/1.0.0/10222333/index.html
file uploaded: http://localhost:8081/repository/site/nexus_android_repo/1.0.0/10222333/sample.apk

NOTE:

Currently supports only Nexus 3.

Extra Features

gota creates a gotalink.txt and ipalink.txt (if uploading an ipa) that contains the url or direct download link. If you are using a CI server, you can have it read these files for quickly getting the url that you can send to your team.

Site Directory Layout

destDir
\__(ipa CFBundleShortVersion or apk versionName)
   \__version.json
   \__(ipa CFBundleVersion or apk versionCode)
	 \__appicon.png
	 \__(ipa or apk file)
	 \__app.plist (if ipa file)
	 \__index.html

Developers

If you are on Windows, ensure to go get spf13/cobra's dependency for it.

GOOS=windows go get -v -u github.com/spf13/cobra
go get -v ./...
go test -v ./...

Testing S3 Feature

Set these environment variables before running go test in s3 package.

AWS_ACCESS_KEY=xxxxx
AWS_SECRET_ACCESS_KEY=xxxxx
GOTEST_AWS_BUCKET=example-bucket

Testing Nexus Feature

You must have a Nexus 3 server running in your machine.

Get it easily via docker command: docker run -d -p 8081:8081 --name nexus3.

Then, create a Raw Repository with a repository id site.

Motivation

gota's People

Contributors

bzon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gota's Issues

Incorrect file type when downloading from AWS S3

@bzon First of all, thank you for making this tool.

We're trying out your tool in our workflow but there's a small problem after uploading apk to AWS S3. When downloading the apk from S3, the file is incorrectly detected as a zip file (something like app-release.apk.zip), and I'd have to change the file name before install it. According to this stackoverflow post: https://stackoverflow.com/questions/44501951/android-apk-is-getting-downloaded-as-a-zip-file-on-mobile-chrome-browser , the MIME type of the S3 object might be incorrect.

Is it possible to set this when uploading to S3?

Create a Testable Environment for CircleCI

Create a docker-compose for Nexus 3 package testing.

The Nexus 3 docker container must contain a "site" repository upon uptime. We need this for testing the nexus features. Default username and password must be admin admin123. Port must be reachable at 8081.

Get APK and IPA from a go ipapk analyzer package

APK and IPA files can be read Read the APK or IPA file with the following helper packages:

https://github.com/DHowett/go-plist
https://github.com/shogo82148/androidbinary

This feature will deprecate passing APK and IPA specific command-line flags such as the buildNumber, bundleID, versionName, versionCode, Title, etc.

This will shorten the required flags and will look like the below:

./gota nexus --nexusHost http://localhost:8081 \
            --nexusRepo site \
            --nexusUser admin \
            --nexusPassword admin123 \
            --destDir android \
            --srcFile pkg/resources/DarkSouls.apk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.