drupal-init-tools.git
5 years agoNEWS: release v0.1.2 v0.1.2
Antonio Ospite [Mon, 27 Aug 2018 15:00:11 +0000 (17:00 +0200)]
NEWS: release v0.1.2

5 years agocreate-profile.sh: fix also the submit callback when creating a new profile
Antonio Ospite [Mon, 27 Aug 2018 14:01:43 +0000 (16:01 +0200)]
create-profile.sh: fix also the submit callback when creating a new profile

When creating a new profile from an existing one, fix also the usage of
the submit callbacks, not only the functions names.

5 years agobootstrap.sh: set the core src-prefix and dst-prefix also for git format-patch
Antonio Ospite [Mon, 27 Aug 2018 13:58:12 +0000 (15:58 +0200)]
bootstrap.sh: set the core src-prefix and dst-prefix also for git format-patch

5 years agobootstrap.sh: fix setting the --uri option for Drush 9
Antonio Ospite [Mon, 27 Aug 2018 13:53:54 +0000 (15:53 +0200)]
bootstrap.sh: fix setting the --uri option for Drush 9

Set the --uri option in Drush 9.

This is basically a port of commit 9d37dad (bootstrap.sh: set the drush
--uri option, 2018-03-16) for Drush 9.

6 years agobootstrap.sh: set the drush --uri option
Antonio Ospite [Fri, 16 Mar 2018 12:34:32 +0000 (13:34 +0100)]
bootstrap.sh: set the drush --uri option

6 years agocreate-profile.sh: make detection of the default_content module more robust
Antonio Ospite [Fri, 16 Mar 2018 12:31:17 +0000 (13:31 +0100)]
create-profile.sh: make detection of the default_content module more robust

Do not just grep on "$ENABLED_MODULES" which is a comma-separated list
on which is harder to match for the exact module name.

Use instead the output of pm-list which has one module name for each
line, this way it is easier to match for the exact name of
"default_content" and avoid picking up other modules which may contain
the string "default_content" in their names.

6 years agodrin.rst: add a note about the web server configuration for userdirs
Antonio Ospite [Wed, 14 Mar 2018 11:38:01 +0000 (12:38 +0100)]
drin.rst: add a note about the web server configuration for userdirs

6 years agodrin.rst: change title of NOTES section to reflect it's about the database
Antonio Ospite [Wed, 14 Mar 2018 11:28:12 +0000 (12:28 +0100)]
drin.rst: change title of NOTES section to reflect it's about the database

There will at least one other note about the web server configuration,
so keep these notes in separate sections, each with its own title.

6 years agodrin.rst: fix typo, s/excute/execute/
Antonio Ospite [Wed, 14 Mar 2018 11:27:31 +0000 (12:27 +0100)]
drin.rst: fix typo, s/excute/execute/

6 years agonew.sh: do not overwrite the existing .gitignore file, just append to it
Antonio Ospite [Mon, 12 Mar 2018 14:27:21 +0000 (15:27 +0100)]
new.sh: do not overwrite the existing .gitignore file, just append to it

6 years agobootstrap.sh: fix sites subdir when specifying options.uri
Antonio Ospite [Mon, 12 Mar 2018 13:49:25 +0000 (14:49 +0100)]
bootstrap.sh: fix sites subdir when specifying options.uri

Drush 9 tries too hard to get the sites subdir from the options.uri
setting.

This is wrong IMHO because options.uri is something relative to the
*web* root and can be subject to web server aliases and whatnot, while
sites-dir is something relative to the local filesystem; mixing the two
is counter-intuitive,

TO be on the safe side, pass the --sites-subdir option explicitly to
"drush site-install", to avoid a possible error when options.uri is
something valid but not expected by drush, like
http://localhost/~user/drupal/web

Fix the following error emitted in such cases:

 [error]  Could not determine target sites directory for site to install. Use --sites-subdir to specify.

6 years agobootstrap.sh: fix wording in a couple of comments
Antonio Ospite [Mon, 12 Mar 2018 12:31:10 +0000 (13:31 +0100)]
bootstrap.sh: fix wording in a couple of comments

6 years agocreate-profile.sh: copy more stuff from the current profile to the new one
Antonio Ospite [Mon, 12 Mar 2018 09:59:09 +0000 (10:59 +0100)]
create-profile.sh: copy more stuff from the current profile to the new one

The "drupal generate:profile" command only provides a stub
implementation for the .install and .profile files which are only fine
when writing a new installation profile from scratch.

When creating a profile form an installed one, it is appropriate to
preserve as much as possible of the original profile, so copy code and
data from the currently installed profile to the newly created one,
adjusting them to the new profile name.

6 years agocreate-profile.sh: use a variable for the profile destination directory
Antonio Ospite [Sat, 10 Mar 2018 21:29:57 +0000 (22:29 +0100)]
create-profile.sh: use a variable for the profile destination directory

This is to avoid some repetitions.

6 years agoclean.sh: make sudo always ask for the password
Antonio Ospite [Sat, 10 Mar 2018 21:15:24 +0000 (22:15 +0100)]
clean.sh: make sudo always ask for the password

Passing the --reset-timestamp option to sudo makes it ignore the cached
credentials and always ask for a password.

This is done to provide the user a second chance to think about what
they are doing, as the removal can be fairly destructive for
a development site.

6 years agocreate-profile.sh: fix pm-list invocation to be compatible with Drush 9
Antonio Ospite [Sat, 10 Mar 2018 19:15:57 +0000 (20:15 +0100)]
create-profile.sh: fix pm-list invocation to be compatible with Drush 9

And while at it also strip the last comma in the generated list.

6 years agobootstrap.sh: don't fail hard if the overwriting profile is not there yet
Antonio Ospite [Sat, 10 Mar 2018 15:23:19 +0000 (16:23 +0100)]
bootstrap.sh: don't fail hard if the overwriting profile is not there yet

6 years agobootstrap.sh: clarify what the --overwrite-profile option does
Antonio Ospite [Sat, 10 Mar 2018 15:22:33 +0000 (16:22 +0100)]
bootstrap.sh: clarify what the --overwrite-profile option does

6 years agobootstrap.sh: stop using the deprecated drush "pm-info" command
Antonio Ospite [Sat, 10 Mar 2018 14:58:30 +0000 (15:58 +0100)]
bootstrap.sh: stop using the deprecated drush "pm-info" command

This fixes the following drush error:

  The pm-info command was deprecated. Please see `drush pm:list` and `composer show`

While at it also use an exact pattern for the module name, this avoids
matching against other modules which may contain the word 'locale' in
their names.

6 years agodrin.rst: add some notes about administrative database access
Antonio Ospite [Sat, 10 Mar 2018 14:44:40 +0000 (15:44 +0100)]
drin.rst: add some notes about administrative database access

6 years agobootstrap.sh: support both password and unix_socket access to the database
Antonio Ospite [Sat, 10 Mar 2018 14:42:52 +0000 (15:42 +0100)]
bootstrap.sh: support both password and unix_socket access to the database

6 years agobootstrap.sh: improve the informational message about 'git core-diff'
Antonio Ospite [Fri, 9 Mar 2018 14:55:06 +0000 (15:55 +0100)]
bootstrap.sh: improve the informational message about 'git core-diff'

6 years agoMakefile: add an explicit "docs" target to build the man page
Antonio Ospite [Fri, 9 Mar 2018 10:05:41 +0000 (11:05 +0100)]
Makefile: add an explicit "docs" target to build the man page

It's easier to remember "make docs" than "make drin.1" and moreover the
explicit "docs" target will show up in shell autocompletion while the
implicit "drin.1" target will not.

6 years agodrin.rst: improve wording in the description of the project purpose
Antonio Ospite [Fri, 9 Mar 2018 09:59:13 +0000 (10:59 +0100)]
drin.rst: improve wording in the description of the project purpose

6 years agobootstrap.sh: use the imperative in comments
Antonio Ospite [Thu, 21 Dec 2017 12:04:01 +0000 (13:04 +0100)]
bootstrap.sh: use the imperative in comments

6 years agobootstrap.sh: always update RewriteBase
Antonio Ospite [Thu, 21 Dec 2017 11:58:11 +0000 (12:58 +0100)]
bootstrap.sh: always update RewriteBase

Cover the case of bootstrapping a site a second time without cleaning
the web/ directory when the user changed the value of SITE_BASE_PATH in
bootstrap.conf: be sure to propagated the change to the .htaccess file.

6 years agoRelease v0.1.1 v0.1.1
Antonio Ospite [Mon, 18 Dec 2017 17:39:02 +0000 (18:39 +0100)]
Release v0.1.1

6 years agobootstrap.sh: add the "--overwrite-profile" to the help text
Antonio Ospite [Mon, 18 Dec 2017 17:27:36 +0000 (18:27 +0100)]
bootstrap.sh: add the "--overwrite-profile" to the help text

And add the option to the man page too.

6 years agoCheck that the "bootstrap" and "clean" subcommands are run in the project dir v0.1.0
Antonio Ospite [Mon, 18 Dec 2017 15:44:37 +0000 (16:44 +0100)]
Check that the "bootstrap" and "clean" subcommands are run in the project dir

6 years agobootstrap.sh: rename SITE_LOCAL_PATH to WEB_ROOT for consistency
Antonio Ospite [Mon, 18 Dec 2017 15:18:06 +0000 (16:18 +0100)]
bootstrap.sh: rename SITE_LOCAL_PATH to WEB_ROOT for consistency

Use the same name for all subcommands.

6 years agonew.sh: use "composer config" instead of sed to set the patches file
Antonio Ospite [Mon, 18 Dec 2017 15:09:57 +0000 (16:09 +0100)]
new.sh: use "composer config" instead of sed to set the patches file

6 years agonew.sh: avoid multiple redirects when creating .gitignore
Antonio Ospite [Mon, 18 Dec 2017 15:07:37 +0000 (16:07 +0100)]
new.sh: avoid multiple redirects when creating .gitignore

6 years agoUse the shell logical operators, avoid the non-portable -o and -a in "test"
Antonio Ospite [Mon, 18 Dec 2017 15:04:33 +0000 (16:04 +0100)]
Use the shell logical operators, avoid the non-portable -o and -a in "test"

6 years agobootstrap.sh: use "grep -E" instead of "egrep", suggested by shellcheck
Antonio Ospite [Mon, 18 Dec 2017 15:03:32 +0000 (16:03 +0100)]
bootstrap.sh: use "grep -E" instead of "egrep", suggested by shellcheck

6 years agoUse "read -r" to get the verbatim input, suggested by shellcheck
Antonio Ospite [Mon, 18 Dec 2017 15:02:06 +0000 (16:02 +0100)]
Use "read -r" to get the verbatim input, suggested by shellcheck

6 years agobootstrap.sh: disable one shellcheck message about sourcing bootstrap.conf
Antonio Ospite [Mon, 18 Dec 2017 14:59:51 +0000 (15:59 +0100)]
bootstrap.sh: disable one shellcheck message about sourcing bootstrap.conf

The file will be available when the script actually runs.

6 years agoFix double quoting, suggested by shellcheck
Antonio Ospite [Mon, 18 Dec 2017 14:54:11 +0000 (15:54 +0100)]
Fix double quoting, suggested by shellcheck

6 years agocreate-profile.sh: fix creating the profile outside of the web root
Antonio Ospite [Mon, 18 Dec 2017 14:12:58 +0000 (15:12 +0100)]
create-profile.sh: fix creating the profile outside of the web root

Use the new --profile-path option of create:profile available since
drupal-console 1.3.0, this avoids removing the profile directory used
when installing the site.

6 years agocreate-profile.sh: remove the core version from the config files
Antonio Ospite [Tue, 21 Nov 2017 10:03:24 +0000 (11:03 +0100)]
create-profile.sh: remove the core version from the config files

This is not strictly necessary but it makes the files a little cleaner.

6 years agonew.sh: fix .htaccess to allow access to "/web" without the trailing slash
Antonio Ospite [Tue, 21 Nov 2017 10:00:08 +0000 (11:00 +0100)]
new.sh: fix .htaccess to allow access to "/web" without the trailing slash

6 years agonew.sh: add a basic .htaccess file to protect sensible files
Antonio Ospite [Thu, 16 Nov 2017 12:08:34 +0000 (13:08 +0100)]
new.sh: add a basic .htaccess file to protect sensible files

6 years agobootstrap.sh: allow explicit overwriting the current installation profile
Antonio Ospite [Thu, 26 Oct 2017 13:50:21 +0000 (15:50 +0200)]
bootstrap.sh: allow explicit overwriting the current installation profile

Also, if the user attempts to install a profile which is already there,
now the scripts exits instead of just printing a message and carrying
on.

The previous lazy behavior could result in some confusion if the user
didn't see the message, because any different settings in the specified
profile would not be picked up, as the previous profile already in
web/profiles/ would be used.

6 years agobootstrap.sh: fix the check on settings.local.php
Antonio Ospite [Wed, 25 Oct 2017 17:51:04 +0000 (19:51 +0200)]
bootstrap.sh: fix the check on settings.local.php

6 years agobootstrap.sh: copy settings.local.php only when it's not already there
Antonio Ospite [Wed, 25 Oct 2017 16:28:23 +0000 (18:28 +0200)]
bootstrap.sh: copy settings.local.php only when it's not already there

This is to preserve local changes in case of a re-bootstrap.

6 years agobootstrap.sh: fix permission handling of sites/default/settings.php
Antonio Ospite [Wed, 25 Oct 2017 16:26:30 +0000 (18:26 +0200)]
bootstrap.sh: fix permission handling of sites/default/settings.php

drush site-install can change the permissions in sites/default so use
a more robust scheme to set them when needed.

6 years agobootstrap.sh: update the installation profile setting before installing
Antonio Ospite [Tue, 24 Oct 2017 11:15:41 +0000 (13:15 +0200)]
bootstrap.sh: update the installation profile setting before installing

This fixes
a Drupal\Core\Installer\Exception\InstallProfileMismatchException

6 years agobootstrap.sh: disable some overly permissive settings in settings.local.php
Antonio Ospite [Tue, 24 Oct 2017 10:55:20 +0000 (12:55 +0200)]
bootstrap.sh: disable some overly permissive settings in settings.local.php

This avoids warnings in the status report after "drin bootstrap --devel"

6 years agobootstrap.sh: allow re-bootstrapping with a different installation profile
Antonio Ospite [Tue, 24 Oct 2017 10:53:18 +0000 (12:53 +0200)]
bootstrap.sh: allow re-bootstrapping with a different installation profile

6 years agobootstrap.sh: remove an obsolete comment
Antonio Ospite [Thu, 22 Jun 2017 15:12:35 +0000 (17:12 +0200)]
bootstrap.sh: remove an obsolete comment

6 years agoInitial import
Antonio Ospite [Mon, 5 Jun 2017 13:13:28 +0000 (15:13 +0200)]
Initial import