Updating Crawl version - michaelbarlow7/dungeon-crawl-android GitHub Wiki
The aim of this project is to keep up with official stable release of Dungeon Crawl: Stone Soup. Since a clone of the official project is added a submodule, we use git to update this code, and then make sure it compiles and runs within our environment. The following outlines the process for updating your version of Dungeon Crawl:Stone Soup from the official repositories.
- cd to the submodule directory (if submodules have been downloaded properly it should be in
<root-dir>
/android-crawl-console) - Checkout the master branch using
git checkout master
- Pull in the latest version of the official repository, including tags, using
git pull -t <repo>
. At the time of writing, the official repository is at[email protected]:crawl/crawl.git
. You may want to update the master on our fork by pushing to our fork. - Run
git tag
and look for the version of Crawl that you're after. It should typically be named the same as the version you want (for example "0.11.0") - Checkout the android branch using
git checkout android
- Merge the tag you wanted into this branch. This can be tricky, since branches can have very old common ancestors and there might be conflicts. See the Merge Process section for an outline on how best to do this
- Run the shell script at the base directory. Might need to edit it to generate more things or whatever
- Run a build. You may get some build errors here.
- Try running the program!
Once it's running successfully, we want to commit and push our Crawl submodule changes, and then we want to commit and push this submodule change within our main repository as well:
- Whilst within the submodule directory (android-crawl-console), ensure all proper modifications are added, and commit.
- Tag HEAD as '
<version>-android
' - Push these changes to the gitorious repository (
git push [email protected]:michaelbarlow7/crawl.git
should work here, and you should also dogit push --tags [email protected]:michaelbarlow7/crawl.git
to push the newly-created tag). - Run
source/util/gen_ver.pl source/build.h
again from the crawl-ref directory, then do another build, so that the build version changes correctly - Update the "totalFiles" variable in SplashActivity.java to the number of files actually copied when running the app (this gets logged).
- Change the minimum install version in SplashActivity
- Change to the root (android) directory, add and commit and the submodule changes.
- Push these changes to the Github repository.
- Ensure you've checkout the android branch
- Merge in the tag, using the recursive-theirs strategy (mostly, we want the tag's changes to the files, though we'll need to take care our changes haven't been overwritten). Run
git merge -s recursive -X theirs <tag> --no-commit
. If you get merge errors at this stage, that's ok. - I think we can easily determine what's added and removed at this point by looking at any changes to crawl-ref/source/android-project/jni/src/Android.mk, seeing as this is used for the tiles build. This helps with the next two steps.
- Add any new relevant .cc files to Android.mk. Typing
git status
will show any new files. Not sure if this is the best way to do it. - Remove any .cc files from Android.mk that have since been deleted.
- Check if anything has happened to our Crawl specific modifications. Android.mk, Application.mk and main.h should still exist.
- Check for any strange merge problems. Sometimes the merge algorithm used can produce strange results, such as duplicating functions in a file. The best way to catch these is to type
git diff --name-only <tag> --
. Our crawl specific files, our .gitmodules, .gitignore files etc should be listed. If you find any that look out of place, check its diff by typinggit diff <tag> -- <file>
. We'll usually want to get the<tag>
version of the file, which we get by goinggit checkout <tag> <file>
. If you miss any files at this stage, the compiler should pick them up anyway
- Update the crawl code by navigating to the directory and executing "git push [email protected]:~barbs/crawl/android-crawl-console.git"
- Assuming you've set it up correctly, you should be able to update the app code by navigating to the base directory and going "git push"
- Don't forget to update the versionCode and versionName in the manifest and README.md. versionCode is an integer simply incremented by 1, versionName is the same as the Crawl version, with a letter that is incremented for additional updates of the app
- Add a commit signifying the release version. The option "--allow-empty" might be handy here
- Push back to this repo with
git push
, then push the tags withgit push --tags
. - Export the application, using my keystore. The filename should use the same format (e.g.
CrawlApp-0-11-0.apk
) - Create a release on this Github repo, making the tag the same as the versionName (don't prefix with 'v'), and upload the corresponding APK. Add release notes.
- Upload the apk to Google Play. Don't forget to add release notes and activate.