Skip to content

Commit

Permalink
Rename profile to sdd - Skilld drupal development
Browse files Browse the repository at this point in the history
  • Loading branch information
andypost committed Mar 9, 2017
1 parent 786ef5d commit dcc4194
Show file tree
Hide file tree
Showing 37 changed files with 38 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .env.default
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COMPOSE_FILE=./src/docker/docker-compose.yml:./src/docker/docker-compose.override.yml
COMPOSE_PROJECT_NAME=projectname
PROFILE_NAME=projectname
PROFILE_NAME=sdd
THEME_NAME=projectname_theme
SITE_NAME=Site name
COMPOSER_REQUIRE=solarium/solarium:3.6.*
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ install:
@echo "Build and run containers..."
docker-compose up -d
docker-compose exec php apk add --no-cache git
make -s reinstall
docker-compose exec -T php composer global require --prefer-dist "hirak/prestissimo:^0.3"
make reinstall

reinstall:
cp src/drush_make/*.make.yml build/; \
docker-compose exec php time drush make profile.make.yml --concurrency=$(shell nproc) --prepare-install --overwrite -y; \
rm build/*.make.yml
docker-compose exec php composer global require --prefer-dist "hirak/prestissimo:^0.3"; \
docker-compose exec php composer config repositories.drupal composer https://packages.drupal.org/8; \
docker-compose exec php time composer require -o --update-no-dev --no-suggest $(COMPOSER_REQUIRE); \
docker-compose exec -T php composer config repositories.drupal composer https://packages.drupal.org/8
docker-compose exec -T php time composer require -o --update-no-dev --no-suggest $(COMPOSER_REQUIRE)
make -s front
make -s si

si:
ifeq ($(PROJECT_INSTALL), config)
-docker-compose exec -T php time drush si config_installer --db-url=mysql://d8:d8@mysql/d8 --account-pass=admin -y config_installer_sync_configure_form.sync_directory=sync
else
docker-compose exec php drush si $(PROFILE_NAME) --db-url=mysql://d8:d8@mysql/d8 --account-pass=admin -y --site-name="$(SITE_NAME)"
docker-compose exec -T php drush si $(PROFILE_NAME) --db-url=mysql://d8:d8@mysql/d8 --account-pass=admin -y --site-name="$(SITE_NAME)"
docker-compose exec php ash -c "drush locale-check && drush locale-update"
endif
make -s chown; \
make -s chown
make -s info

info:
Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,11 @@ For Linux install <a href="https://docs.docker.com/compose/install/" target="_bl

4\.1\.1\. Change _*.make.yml_ and list your modules/profiles, etc

4\.2\. Check _projectname_ folder
4\.2\. Optionally rename _src/themes/projectname_theme_ to real project theme name

4\.2\.1\. Rename _projectname_ folder to real project name
4\.2\.1\. Setup your theme by renaming editing _projectname_theme.*_ files

4\.2\.2\. Rename and edit _projectname.info.yml_ and _projectname.install_

4\.3\. Rename _projectname/projectname_theme_ to real project theme name

4\.3\.1\. Setup your theme by renaming editing _projectname_theme.*_ files
4\.3\. Optionally add you custom modules to _src/modules_

5\. Run `make`

Expand All @@ -53,10 +49,10 @@ For Linux install <a href="https://docs.docker.com/compose/install/" target="_bl
* `make clean` - totally remove project build folder, docker containers and network.
* `make reinstall` - rebuild & reinstall site.
* `make si` - reinstall site.
* `make info` - Show project info (IP).
* `make info` - Show project services IP addresses.
* `make chown` - Change permissions inside container. Use it in case you can not access files in _build_. folder from your machine.
* `make exec` - docker exec into php container.
* `make devel` - Devel + kint setup, and config for Twig debug mode.
* `make phpcs` - check codebase with `phpcs` sniffers to make sure it conforms https://www.drupal.org/docs/develop/standards.
* `make phpcbf` - fix codebase according to Drupal standards https://www.drupal.org/docs/develop/standards.
* `make cex` - executes config export to `config/sync` directory
* `make cex` - executes config export to `config/sync` directory.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/projectname/projectname.info.yml → src/sdd/sdd.info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Projectname
name: SDD
type: profile
description: 'Projectname application installation profile'
description: 'Skill drupal development installation profile'
core: 8.x

dependencies:
Expand Down Expand Up @@ -78,12 +78,12 @@ dependencies:
- admin_toolbar
- components
# Custom modules
# - projectname_default_content
# - sdd_default_content

themes:
- projectname_theme
- seven

keep_english: true
'interface translation project': projectname
'interface translation server pattern': 'profiles/projectname/%language_custom.po'
'interface translation project': sdd
'interface translation server pattern': 'profiles/sdd/%language_custom.po'
6 changes: 3 additions & 3 deletions src/projectname/projectname.install → src/sdd/sdd.install
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

/**
* @file
* Install, update and uninstall functions for Project installation profile.
* Install, update and uninstall functions for Skilld installation profile.
*/

use Drupal\shortcut\Entity\Shortcut;
Expand All @@ -15,7 +16,7 @@ use Drupal\user\RoleInterface;
*
* @see system_install()
*/
function projectname_install() {
function sddk_install() {
$config_factory = \Drupal::configFactory();
// Set front page to "node".
$config_factory->getEditable('system.site')
Expand Down Expand Up @@ -54,5 +55,4 @@ function projectname_install() {
$config_factory->getEditable('node.settings')
->set('use_admin_theme', TRUE)
->save(TRUE);

}
29 changes: 18 additions & 11 deletions src/projectname/projectname.profile → src/sdd/sdd.profile
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
<?php

/**
* @file
* Enables modules and site configuration for a multilingual demo installation.
* Enables modules and site configuration for a multilingual installation.
*
* Copied from https://www.drupal.org/project/multilingual_demo project.
*/

use Symfony\Component\Yaml\Parser;

/**
* Implements hook_install_tasks().
*/
function projectname_install_tasks(&$install_state) {
return array(
'projectname_install_import_language_config' => array(),
);
function sdd_install_tasks(&$install_state) {
return [
'sdd_install_import_language_config' => [],
];
}

/**
* Implements hook_install_tasks_alter().
*/
function projectname_install_tasks_alter(&$tasks, $install_state) {
function sdd_install_tasks_alter(&$tasks, $install_state) {
// Moves the language config import task to the end of the install tasks so
// that it is run after the final import of languages.
$task = $tasks['projectname_install_import_language_config'];
unset($tasks['projectname_install_import_language_config']);
$tasks = array_merge($tasks, array('projectname_install_import_language_config' => $task));
$task = $tasks['sdd_install_import_language_config'];
unset($tasks['sdd_install_import_language_config']);
$tasks = array_merge($tasks, ['sdd_install_import_language_config' => $task]);
}

/**
* Imports language configuration overrides.
*/
function projectname_install_import_language_config() {
function sdd_install_import_language_config() {
$language_manager = \Drupal::languageManager();
$yaml_parser = new Parser();
// The language code of the default locale.
Expand All @@ -41,7 +44,11 @@ function projectname_install_import_language_config() {
// chooses to install in Hungarian, French, or Spanish, the language config is
// imported by core and the user has the chance to override it during the
// installation process.
$langcodes = array_diff(scandir($language_config_directory), array('..', '.', $site_default_langcode));
$langcodes = array_diff(scandir($language_config_directory), [
'..',
'.',
$site_default_langcode,
]);

foreach ($langcodes as $langcode) {
// All .yml files in the language's config subdirectory.
Expand Down

0 comments on commit dcc4194

Please sign in to comment.