Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/degree9/boot-semgit
Semantic Git access from boot tasks.
https://github.com/degree9/boot-semgit
boot-clj clojure git
Last synced: 26 days ago
JSON representation
Semantic Git access from boot tasks.
- Host: GitHub
- URL: https://github.com/degree9/boot-semgit
- Owner: degree9
- License: mit
- Created: 2016-08-22T22:47:37.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-05T03:13:55.000Z (over 5 years ago)
- Last Synced: 2024-04-09T16:57:45.953Z (7 months ago)
- Topics: boot-clj, clojure, git
- Language: Clojure
- Size: 109 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Clojars Project][clojars-badge]][clojars]
[![Dependencies Status][deps-badge]][deps]
[![Downloads][downloads-badge]][downloads]
[![Slack][slack-badge]][slack]Semantic Git access from [boot-clj][1].
---
boot-semgit is developed and maintained by Degree9---
* Provides Git Porcelain tasks (wrappers around git binary)
`git-add, git-branch, git-commit, etc.`
See [which tasks are provided][1].> The following outlines basic usage of the task, extensive testing has not been done.
> Please submit issues and pull requests!## Usage
Add `boot-semgit` to your `build.boot` dependencies and `require` the namespace:
```clj
(set-env! :dependencies '[[degree9/boot-semgit "X.Y.Z" :scope "test"]])
(require '[degree9.boot-semgit :refer :all])
```Semgit tasks look similar to regular git commands. Tasks follow a common name pattern of `git-`:
```bash
boot git-commit --all --message "Commit from boot-clj."
```Using the `git` binary for one off tasks still makes more sense and results in less typing:
```bash
git commit -a -m "Commit from git."
```## Rational
#### Why use Semgit tasks?
Boot tasks provide access to your build pipeline, integrating directly with the pipeline allows git commands to be executed as part of your build workflow or from the REPL, again resulting in less typing and becoming a repeatable process which many developers across an entire project can use.
#### Improve your development process:
Fetch remote changes when you start your development:
```clojure
(boot/deftask develop
"Build project for development."
[...]
(let [...]
(comp
(git-pull :branch "origin/master")
(watch)
...
(serve))))
```#### Why not just call it `boot-git`?
This task provides porcelain git functions and is designed to build workflows (getting to that in a moment).
Meaning internal or plumbing tasks are not provided, therefore we wrap the systems `git` binary and only attempt to provide a subset of functionality. `boot-git` should probably be reserved for a set of tasks which implement `git` using a native library such as `JGit`. We will leave that up to you!## Workflows
#### Where does the "semantic" part come in?
`boot-semgit` provides a set of tasks which integrate with `boot-semver` to provide consistent
branching and versioning of projects. Our goal is to provide accelerated development with common community driven process.Open a feature branch from `master`:
```clojure
;; require the workflow namespace
(require '[degree9.boot-semgit.workflow :refer :all])
```
```bash
$ boot feature --name testCreating feature branch: feature-test
Updating version...
Saving changes...
```Close a feature branch (merging changes) into `master`:
```bash
$ boot feature --name test -c -b masterClosing feature branch: feature-test
Cleaning branch history...
Syncing version...
Saving changes...
Switching to target: master
Merging feature: feature-test
```#### Task Options
The `feature` task exposes a few options.
```clojure
n name NAME str "Feature name which will be appended to 'feature-'."
c close bool "Closes a feature branch using 'git-rebase' and 'git-merge'."
b branch BRANCH str "The base or target branch for this feature."
r remote REMOTE str "Remote repository to use as a base for this feature."
d delete bool "Delete/Remove a feature without closing it."
```---
Support this and other open-source projects on Patreon!---
[1]: https://github.com/degree9/boot-semgit/wiki/Porcelain-Tasks
[clojars-badge]: https://img.shields.io/clojars/v/degree9/boot-semgit.svg
[clojars]: https://clojars.org/degree9/boot-semgit
[deps-badge]: https://versions.deps.co/degree9/boot-semgit/status.svg
[deps]: https://versions.deps.co/degree9/boot-semgit
[downloads-badge]: https://versions.deps.co/degree9/boot-semgit/downloads.svg
[downloads]: https://versions.deps.co/degree9/boot-semgit
[slack-badge]: https://img.shields.io/badge/clojurians-degree9-%23e01563.svg?logo=slack&longCache=true
[slack]: https://clojurians.slack.com/channels/degree9/