jonpugh / composer-git-build
Commands to get vendor and other ignored files into git,
Installs: 279
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 3
Open Issues: 0
Type:composer-plugin
Requires
- composer-plugin-api: ^1.1
This package is auto-updated.
Last update: 2024-11-14 06:12:14 UTC
README
The goal of this tool is to make it as easy as possible to commit your ignored directories to git.
Otherwise known as "artifact-building", this command will:
- If --build-dir is specified, create a new repo and add your git remotes.
- Pull in latest changes from current branch.
- Automatically modify your .gitignore file, allowing vendor and other code to be added.
- Commit all new code that is no longer ignored.
- Create a new branch or tag.
- Push the branch or tag to origin.
This plugin code was borrowed heavily from Acquia's BLT command deploy
command.
Usage
-
Add to your composer project or globally:
composer require jonpugh/composer-git-build
-or-
composer global require jonpugh/composer-git-build
-
Add to your .gitignore file:
## IGNORED IN GIT BUILD: ## # Items below this line will retained in artifacts built with the `composer git-build` command.
-
Add to your composer.json file:
{ "config": { "git.remotes": [ "git@github.com:organization/build-repo.git", "svn@acquia.com" ] } }
The new built repo will have these remotes added automatically, and the tag or branch pushed to them.
-
Run
composer git-build
:Usage: git-build [options] Options: -b, --build-dir[=BUILD-DIR] Directory to create the git artifact. Defaults to the composer working-dir option. --branch=BRANCH Branch to create. --tag=TAG Tag to create. -m, --commit-msg=COMMIT-MSG Commit message to use. --ignore-dirty Allow committing even if git working copy is dirty (has modified files). --dry-run Build and commit to the repository but do not push.
Thanks
- @acquia/blt team for getting the ball rolling.
- @generalredneck for his .gitignore trick his session from Cornell DrupalCamp: https://www.youtube.com/watch?v=WMd60xmQvlY&feature=youtu.be