fossasia / flappy-svg

Flappy Bird in SVG. Play it at http://fossasia.github.io/flappy-svg/
Other
1.61k stars 157 forks source link

Adding functionality to automatically update the apk #262

Closed alejoheredia closed 7 years ago

alejoheredia commented 7 years ago

This PR solves the issue #250. I created 2 files, one of them builds the gradlew in the folder FlappySVG_Android, and the other generates the apk file in the branch apk, you can check it here

Check this image of the generated app working on my phone screenshot_20170115-132552

Follow this steps to make this feature work on this repo:

  1. Create a branch named apk with a folder named FlappySVG-Apk
  2. Merge this PR
  3. Generate a Personal Access Token on Github and check the following options: screenshot_20170115443-132552
  4. Go to the Travis flappy-svg page
  5. Go to settings
  6. Go to Environment Variables and create one with the name GITHUB_API_KEY and the value will be the generated Personal Access Token that you created on step 3
  7. Replace the following line that you will find inupdate-apk.sh: git clone --quiet --branch=apk https://heredroky:$GITHUB_API_KEY@github.com/heredroky/flappy-svg apk > /dev/null with: git clone --quiet --branch=apk https://fossasia:$GITHUB_API_KEY@github.com/fossasia/flappy-svg apk > /dev/null
  8. Replace the following line that you'll find in update-gradle.sh: git clone --quiet --branch=master https://heredroky:$GITHUB_API_KEY@github.com/heredroky/flappy-svg master > /dev/null with: git clone --quiet --branch=master https://fossasia:$GITHUB_API_KEY@github.com/fossasia/flappy-svg master > /dev/null
  9. You are good to go
niccokunzmann commented 7 years ago

Awesome! I will have a look at it tomorrow and follow the steps to get it working :)

On 15.01.2017 19:38, Alejandro Heredia wrote:

This PR solves the issue #250 https://github.com/fossasia/flappy-svg/issues/250. I created 2 files, one of them builds the gradlew in the folder FlappySVG_Android, and the other generates the apk file in the branch apk, you can check it here https://github.com/Heredroky/flappy-svg/tree/apk/FlappySVG-Apk

Check this image of the generated app working on my phone screenshot_20170115-132552 https://cloud.githubusercontent.com/assets/15079370/21965104/aac1b3be-db26-11e6-83e2-fac9acefbd8c.png

Follow this steps to make this feature work on this repo:

  1. Create a branch named |apk| with a folder named |FlappySVG-Apk|
  2. Merge this PR
  3. Generate a Personal Access Token on Github and check the following options: screenshot_20170115443-132552 https://cloud.githubusercontent.com/assets/15079370/21791662/6a1de6ca-d6b2-11e6-844a-226300c95c9d.png
  4. Go to the Travis flappy-svg page https://travis-ci.org/fossasia/flappy-svg
  5. Go to settings
  6. Go to Environment Variables and create one with the name GITHUB_API_KEY and the value will be the generated Personal Access Token that you created on step 3
  7. Replace the following line that you will find in|update-apk.sh|: |git clone --quiet --branch=apk https://heredroky:$GITHUB_API_KEY@github.com/heredroky/flappy-svg apk > /dev/null| with: |git clone --quiet --branch=apk https://fossasia:$GITHUB_API_KEY@github.com/fossasia/flappy-svg apk > /dev/null|
  8. Replace the following line that you'll find in |update-gradle.sh|: |git clone --quiet --branch=master https://heredroky:$GITHUB_API_KEY@github.com/heredroky/flappy-svg master > /dev/null| with: |git clone --quiet --branch=master https://fossasia:$GITHUB_API_KEY@github.com/fossasia/flappy-svg master > /dev/null|
  9. You are good to go

    You can view, comment on, or merge this pull request online at:

https://github.com/fossasia/flappy-svg/pull/262

    Commit Summary

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fossasia/flappy-svg/pull/262, or mute the thread https://github.com/notifications/unsubscribe-auth/AAieIGLOedWDYOJUaKu2ZvE_rG_DGOThks5rSmedgaJpZM4Lj_i_.

alejoheredia commented 7 years ago

@niccokunzmann Ok 😄 , cheers!

niccokunzmann commented 7 years ago

@Heredroky In which line do you build the apk file?

The permissions for the token are quite huge. I am not sure if I can do such a thing. I will have a look if it works with less permissions.

What are your thoughts?

alejoheredia commented 7 years ago

@niccokunzmann Did you create the branch apk with the folder FlappySVG-Apk?

abishekvashok commented 7 years ago

No the apk are stored there.

niccokunzmann commented 7 years ago

I am waiting for the second account to be there.