Skip to content

Commit

Permalink
Merge pull request #21 from universityofadelaide/feature/remove-ua-sp…
Browse files Browse the repository at this point in the history
…ecific-parts

Convert to using env var for install profile
  • Loading branch information
singularo authored Oct 16, 2017
2 parents ed340c5 + 0d4a46b commit f387071
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 0 additions & 8 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,4 @@ public function __construct()
// Put project specific overrides here, below the parent constructor.
}

/**
* {@inheritdoc}
*/
protected function getDrupalProfile()
{
// Replace this with the profile of your choice.
return "standard";
}
}
19 changes: 13 additions & 6 deletions RoboFileBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,19 @@ public function __construct() {
}
}

/**
* Force projects to declare which install profile to use.
*
* I.e. return 'some_profile'.
*/
protected abstract function getDrupalProfile();
/**
* Force projects to declare which install profile to use.
*
* I.e. return 'some_profile'.
*/
protected function getDrupalProfile() {
$profile = getenv('SHEPHERD_INSTALL_PROFILE');
if (empty($profile)) {
$this->say("Install profile environment variable is not set.\n");
exit(1);
}
return $profile;
}

/**
* Returns known configuration from environment variables.
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ services:
PUBLIC_DIR: web/sites/default/files
HASH_SALT: random-hash
CONFIG_SYNC_DIRECTORY: /shared/private/random-hash/sync
SHEPHERD_INSTALL_PROFILE: standard
volumes:
- .:/code
- shared:/shared
Expand Down

0 comments on commit f387071

Please sign in to comment.