Giter Club home page Giter Club logo

boot-semgit's Introduction

Clojars Project Dependencies Status Downloads Slack

Semantic Git access from boot-clj.



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.

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:

(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-<command>:

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:

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:

(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:

;; require the workflow namespace
(require '[degree9.boot-semgit.workflow :refer :all])
$ boot feature --name test

Creating feature branch: feature-test
Updating version...
Saving changes...

Close a feature branch (merging changes) into master:

$ boot feature --name test -c -b master

Closing 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.

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."

Patreon
Support this and other open-source projects on Patreon!


boot-semgit's People

Contributors

burn2delete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

boot-semgit's Issues

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.