Git Product home page Git Product logo

aquifer-git's Introduction

aquifer-git

This extension enables Aquifer to deploy builds of an Aquifer project to a git repository. This makes it easy to deploy Drupal websites to Pantheon, Acquia, or any repository host.

Installation

To install aquifer-git, run the below command from within your Aquifer project:

aquifer extension-add aquifer-git

Nodegit issues.

On some versions of OSX, this node module will fail to install or run with the error:

Cannot find module './build/Debug/nodegit'

To resolve this, take the following steps after the extension has had a faulty installation or load.

brew install openssl
brew link --force openssl
cd .aquifer/node_modules/nodegit
npm install

Use

This extension adds a deploy-git command to your Aquifer project. When run, it will checkout a git repository, build the current project into the repository, commit the changes, and push to the origin.

There are a few flags and configuration options which allow you to specify the repository, branch, commit message, and build root folder:

  • -r --remote - Repository that this command should deploy to.
  • -b --branch - Branch within the remote that this command should deploy to.
  • -m --message - Message that will be applied to the deployment commit.
  • -f --folder - Folder within the remote repository in which the project should build. (For instance, this should be docroot when deploying to an Acquia repository).
  • -n --name - Name to use for the deployment commit signature. If name is specified, email is also required.
  • -e --email - Email to use for the deployment commit signature. If email is specified, name is also required.

All of these options can be set within aquifer.json so you do not have to specify the flags/values every time you would like to run deploy-git. To learn more about setting these options, read the Configuration section of this document.

Example useage

aquifer deploy-git -r "[email protected]:repositoryname.git" -b "master" -m "Version 2.0" -f "docroot"

Configuration

The options for deploy-git can be set in your project's aquifer.json file so you do not have to specify them every time you run deploy-git.

Available options

remote

The remote repository to deploy to.

branch

The branch on the remote repository to deploy to.

folder

A subfolder within the repository to build into.

name

The name to include in the commit signature.

email

The email to include in the commit signature.

deploymentFiles

This is deprecated in favor of the addLinks option.

An array of objects containing a src and dest property. These files will be copied from src to dest after the build and before deploying.

excludeLinks

An array of destination directories to exclude when copying linked project directories to build targets. The default is ["sites/default/files"] to ensure the files directory (which is sometimes quite large) is excluded when building for deployment.

addLinks

An array of objects containing src, dest, and type properties. These files or directories will be copied from src to dest during the build.

delPatterns

An array of patterns indicating what should be deleted when clearing the cloned repository in preparation for the new build. The default is ["*", "!.git"] which deletes everything except the .git directory.

Example configuration:

in your aquifer.json file:

...
"extensions": {
  "aquifer-git": {
    "source": "aquifer-git",
    "remote": "[email protected]:repositoryname.git",
    "branch": "master",
    "folder": "docroot",
    "name": "Deploy Bot",
    "email": "[email protected]",
    "deploymentFiles": [
      {
        "src": "deploy/.gitignore",
        "dest": ".gitignore"
      },
      {
        "src": "deploy/.htaccess",
        "dest": ".htaccess"
      }
    ],
    "excludeLinks": ["sites/default/files"],
    "addlinks": [
      {
        "src": "path/to/dir/in/project",
        "dest": "path/to/dir/in/build",
        "type": "dir"
      }
    ],
    "delPatterns": ["*", "!.git"]
  }
}
...

aquifer-git's People

Contributors

chasingmaxwell avatar patrickocoffeyo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.