Skip to content

Commit

Permalink
Attogram Games v3.1.2 - branch support
Browse files Browse the repository at this point in the history
  • Loading branch information
attogram committed May 1, 2019
1 parent cbca9f4 commit c44ab66
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -23,7 +23,7 @@ loderunner_totalrecall/
mah-jongg/
missile-game/
pacman/
paint-run2/
paint-run/
particle-clicker/
phaser-cat/
polybranch/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -34,7 +34,7 @@ of the following games:
* Mah-jongg - <https://github.com/tiansh/tjmj>
* Missile Game - <https://github.com/bwhmather/missile-game>
* pacman - <https://github.com/mumuy/pacman>
* Paint Run 2 - <https://github.com/ahl389/paint-run2> _(requires yarn)_
* Paint Run 2 - <https://github.com/ahl389/paint-run2>
* Particle Clicker - <https://github.com/particle-clicker/particle-clicker>
* Phaser Cat - <https://github.com/DaxChen/phaser-cat> _(requires yarn)_
* PolyBranch - <https://github.com/gbatha/PolyBranch>
Expand Down
4 changes: 2 additions & 2 deletions TODO.md
@@ -1,6 +1,6 @@
# Future Developments

* build steps: check `game['require']` requirements exists or skip game
* auto build about/ page
* .htaccess 404, 503 setup
* php build.php self-update = cd HOMEDIRECTORY;git pull
* build steps: check game['require'] requirements exists or skip game
* add branch support to git repo
72 changes: 35 additions & 37 deletions _build/games.php
Expand Up @@ -112,15 +112,6 @@
'mobile' => false,
'desktop' => true,
],
'phaser-cat' => [
'name' => 'Phaser Cat',
'tag' => 'fighting feline',
'git' => 'https://github.com/DaxChen/phaser-cat.git',
'require' => ['yarn'],
'build' => ['yarn install', 'yarn run deploy'],
'mobile' => false,
'desktop' => true,
],
'clumsy-bird' => [
'name' => 'Clumsy Bird',
'tag' => 'flappy happy',
Expand All @@ -135,13 +126,11 @@
'mobile' => true,
'desktop' => true,
],
'paint-run2' => [
'name' => 'Paint Run 2',
'tag' => 'make it all blue',
'paint-run' => [
'name' => 'Paint Run',
'tag' => 'paint it all blue',
'git' => 'https://github.com/ahl389/paint-run2.git',
'require' => ['yarn'],
'build' => ['yarn', 'yarn run build'],
'index' => 'build/',
'branch' => 'gh-pages',
'mobile' => false,
'desktop' => true,
],
Expand All @@ -152,28 +141,6 @@
'mobile' => true,
'desktop' => true,
],
'raging-gardens' => [
'name' => 'Raging Gardens',
'tag' => 'farting ninja rabbits',
'git' => 'https://github.com/alunix/RagingGardensFB.git',
'mobile' => false,
'desktop' => true,
],
'missile-game' => [
'name' => 'Missile Game',
'tag' => 'fly thru it',
'git' => 'https://github.com/bwhmather/missile-game.git',
'mobile' => true,
'desktop' => true,
],
'polybranch' => [
'name' => 'PolyBranch',
'tag' => 'fly thru trees',
'git' => 'https://github.com/gbatha/PolyBranch',
'index' => 'polybranchweb/',
'mobile' => false,
'desktop' => true,
],
'pacman' => [
'name' => 'pacman',
'tag' => 'eat the dots',
Expand Down Expand Up @@ -210,6 +177,13 @@
'mobile' => false,
'desktop' => true,
],
'raging-gardens' => [
'name' => 'Raging Gardens',
'tag' => 'farting ninja rabbits',
'git' => 'https://github.com/alunix/RagingGardensFB.git',
'mobile' => false,
'desktop' => true,
],
'underrun' => [
'name' => 'Underrun',
'tag' => 'run &amp; fight',
Expand All @@ -225,6 +199,15 @@
'mobile' => true,
'desktop' => true,
],
'phaser-cat' => [
'name' => 'Phaser Cat',
'tag' => 'fighting feline',
'git' => 'https://github.com/DaxChen/phaser-cat.git',
'require' => ['yarn'],
'build' => ['yarn install', 'yarn run deploy'],
'mobile' => false,
'desktop' => true,
],
'html5-hearts' => [
'name' => 'Hearts',
'tag' => 'card game',
Expand All @@ -239,6 +222,21 @@
'mobile' => false,
'desktop' => true,
],
'missile-game' => [
'name' => 'Missile Game',
'tag' => 'fly thru it',
'git' => 'https://github.com/bwhmather/missile-game.git',
'mobile' => true,
'desktop' => true,
],
'polybranch' => [
'name' => 'PolyBranch',
'tag' => 'fly thru trees',
'git' => 'https://github.com/gbatha/PolyBranch',
'index' => 'polybranchweb/',
'mobile' => false,
'desktop' => true,
],
'javascript-piano' => [
'name' => 'Piano J',
'tag' => 'synthy javascript',
Expand Down
6 changes: 5 additions & 1 deletion _build/src/AttogramGames.php
Expand Up @@ -21,7 +21,7 @@

class AttogramGames
{
const VERSION = '3.1.2';
const VERSION = '3.2.0';

/** @var string */
private $title;
Expand Down Expand Up @@ -169,6 +169,10 @@ private function installGames()
$this->verbose("INSTALLING: $gameIndex: $gameDirectory");
chdir($this->homeDirectory);
$this->syscall('git clone ' . $game['git'] . ' ' . $gameIndex);
if (!empty($game['branch'])) {
chdir($gameDirectory);
$this->syscall('git checkout ' . $game['branch']);
}
$this->buildSteps($gameIndex, $game);
}
}
Expand Down
File renamed without changes

0 comments on commit c44ab66

Please sign in to comment.