Skip to content

Development Workflow

The Bear edited this page Mar 24, 2022 · 3 revisions

Project preparation and pull request creation

  1. Make your own copy of xmage repository (fork it from xmage page): shot_200121_091358
  2. Go to your project page and make new branch for all changes:
    shot_200121_091440
  3. Use IDE tools to clone your github project:
    shot_200121_092201 shot_200121_092316
  4. Switch to your branch by IDE and make any commits to it;
  5. Open your repository on github and press "new pull request button" to create PR for main xmage repository: shot_200121_091507

Test other pull request

If you want to test other pull request before merge.

Simple way:

  1. Use github hints by click on "view command line instructions": shot_200121_090812

Difficult way:

  1. Go to pull request page and save it's number like #4306;
  2. Open git and run command to fetch new pull request to new branch: git fetch origin pull/4306/head:test-pull-request where:
  • origin -- name of the xmage repository (to find out it in IntellJ IDEA go to VCS -> Git -> Remotes);
  • 4306 -- pull request number;
  • test-pull-request -- temporary branch for test;
  1. Open new created branch by checkout test-pull-request;

Build your own release

If you want to build your own release (nightly build) and distribute it to your friends then follow that:

  1. Install IDE and setup it to build xmage projects (see Developer Getting Started);
  2. Build full source code for client and server by clean install -DskipTests maven command: shot_200121_091046
  3. Build release packs for client and server by assembly:assembly maven command: shot_200121_091150
  4. Download official release, run it, update all files, clean up it and prepare for re-release:
    • Delete folder ..xmage\java (you can't distribute with client -- each OS used different java versions and must download it by launcher);
    • Open installed.properties file in launcher folder and remove line java.version=... (it's help launcher to download new java on startup);
    • You can also edit line xmage.version=1.4.29V4 (2018-05-01) to change it to current versions -- it's help disable update notification about "new version available" on startup;
    • Delete all files and folders in ..xmage\mage-client\plugins\images (if you want distribute your client with card images and icons then do not clean it);
    • Delete all files in ..xmage\mage-client\db and in ..\xmage\mage-server\db (it's help to re-create update cards data);
  5. Copy zip-files and unpack it to that release folder with file replacement:
    • ..\Mage.Client\target\mage-client.zip;
    • ..\Mage.Server\target\mage-server.zip;
  6. Zip all xmage folder and release that pack -- other users must download it, unzip, run launcher, update java and start to play (do not use "update" again after java download -- it's will rewrite your files with official release;
  7. Some versions is not fully compatible with current official servers and potential can cause bugs and freezes -- try to use it with new server.
Clone this wiki locally