Skip to content

Adding a New Official Map Repository

Dan Van Atta edited this page Oct 1, 2015 · 5 revisions

Happily these are all one-time set up steps.

Before you begin

You will need:

  • admin access to add repositories
  • the personal access token associated with the @tripleabuilderbot github account, if you don't have that, but do have access to that account, you can add a new token (the token is visible only once when it is added). At the moment it seems we will try to stick to one access token.

Setup on Github.com

  • Create the map repository in github, initialize it with a readme
  • Create a github team that matches the repo name
    • add the map creator to this team
    • set the team to have admin access for the repository
  • Grant write access to the map admin team

Setup on Local Computer

  • Clone the repo
  • Create a folder called "map"
  • Place all map contents into the "map" folder.
  • Find a '.gitignore' and 'build.gradle' file from another map repository and copy them into the repo
  • Add a '.travis.yml' file. Strip off the entire deploy section. Run:
sudo apt-get install ruby-dev -y
sudo gem install travis
travis setup releases
  • This will add an encrypted API key to .travis.yml. Now restore the last 4 or 5 lines of the deploy section, notably adding back the "on" clause and prerelease property, etc. Effectively only the api key should be changing.
  • Push the files

Setup on travis-ci.org

  • Go to Travis, the new repository will hopefully appear, click on it and find the 'settings' link
  • Add the following three environment variables:
  • GITHUB_PERSONAL_ACCESS_TOKEN_FOR_TRAVIS, personal access token of the tripleabuilderbot (https://github.com/settings/tokens). Either the existing token can be used if it is known, or a new one can be created and then used from then on. (use default value, do not check the box making this value publicly visible)
  • REPO_NAME, this should match the name of the repository, used for naming the map zip file that is produced. (check the box to make the value publicly visible)
  • MAP_VERSION, the map 'major' version. Bumping this indicates a new release version. '0' means the map is in beta, '1' is the first major release, and so forth. (check the box to make the value publicly visible)

Testing

  • Make a small change, push it
  • Verify a new Travis starts and succeeds
  • Verify you see a new release in the repository github releases page
  • verify the release is marked as a prerelease
  • verify the map zip file has been uploaded to the prerelease
  • verify that unzipping the map zip explodes the map files correctly