Skip to content
Snippets Groups Projects
Commit e8d5729f authored by jurgenhaas's avatar jurgenhaas
Browse files

Get ready for first release

parent 0ff43673
No related branches found
No related tags found
No related merge requests found
Pipeline #
stages:
- deploy
Deploy:
stage: deploy
script:
- "apb deploy"
only:
- some-branch
- curl -XPOST -H'content-type:application/json' "https://packagist.org/api/update-package?username=${PACKAGIST_USERNAME}&apiToken=${PACKAGIST_API_TOKEN}" -d'{"repository":{"url":"'${CI_PROJECT_URL}'"}}'
# Usage
## Create new project for local development
```
composer create-project lakedrops/d8-project DIRNAME --stability dev --no-interaction
```
This will build the full structure and create a git repository which you can then use during the full live-cycle of that project.
## Deploy project to upstream stages
For initial deployment, follow this:
```
mkdir /PATH/TO/ROOT
cd /PATH/TO/ROOT
git clone YOUR-GIT-REPOSITORY .
composer install
```
For later update:
```
cd /PATH/TO/ROOT
git pull
composer update
```
## Adding new and updating existing components
Edit the composer.json file accoring to your requirements and then run `composer update`.
# Links
[Using Composer to install Drupal packages through Drupal.org](https://www.drupal.org/node/2718229)
......
......@@ -2,17 +2,27 @@
"name": "lakedrops/d8-project",
"description": "Drupal 8 template for a composer based deployment workflow",
"type": "project",
"keywords": ["Drupal", "Development", "Install", "Update"],
"homepage": "https://gitlab.paragon-es.de/lakedrops/d8-project",
"license": "GPL-2.0+",
"authors": [
{
"name": "Jürgen Haas",
"email": "juergen@paragon-es.de",
"homepage": "https://www.paragon-es.de",
"role": "Drupal Expert"
},
{
"name": "Richard Papp",
"email": "richard.papp@boromino.com",
"homepage": "http://www.boromino.com",
"role": "Drupal Expert"
}
],
"support": {
"issues": "https://gitlab.paragon-es.de/lakedrops/d8-project/issues",
"source": "https://gitlab.paragon-es.de/lakedrops/d8-project/tree/master"
},
"repositories": [
{
"type": "composer",
......@@ -23,7 +33,7 @@
"composer/installers": "^1.0.20",
"drupal-composer/drupal-scaffold": "^2.0.1",
"cweagans/composer-patches": "~1.0",
"lakedrops/d8-project-scaffold": "^0.1.0",
"lakedrops/d8-project-scaffold": "^0.2.0",
"drupal/core": "8.1.7",
"drush/drush": "~8.0",
"drupal/console": "~0.10",
......
This directory contains commands, configuration and site aliases for Drush. See http://packages.drush.org/ for a directory of Drush commands installable via Composer.
<?php
/*
* Customize this file as desired. See https://github.com/drush-ops/drush/blob/8.x/examples/policy.drush.inc for documentation.
*/
/**
* Implements drush_hook_COMMAND_validate().
*
* Encourage folks to use `composer` instead of Drush pm commands
*/
function drush_policy_pm_updatecode_validate() {
return _deny_message();
}
function drush_policy_pm_update_validate() {
return _deny_message();
}
function drush_policy_pm_download_validate() {
return _deny_message();
}
function _deny_message() {
if (!drush_get_option('pm-force')) {
$msg = 'This codebase is assembled with Composer instead of Drush. Use `composer update` and `composer require` instead of `drush pm-updatecode` and `drush pm-download`. You may override this error by using the --pm-force option.';
return drush_set_error('POLICY_PM_DENY', dt($msg));
}
}
/**
* Implements hook_drush_help_alter().
*/
function policy_drush_help_alter(&$command) {
if (in_array($command['command'], array('pm-updatecode', 'pm-update', 'pm-download'))) {
$command['options']['pm-force'] = 'Override site policy and allow Drush codebase management (pm-* commands)';
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment