diff --git a/Makefile b/Makefile index 05b6551..9fe213f 100644 --- a/Makefile +++ b/Makefile @@ -37,18 +37,31 @@ lint: .PHONY: test test: @printf "\n" +<<<<<<< HEAD + ginkgo -r +======= ginkgo -r --progress +>>>>>>> master @printf "\n" .PHONY: test-ci test-ci: @printf "\n" +<<<<<<< HEAD + ginkgo -r \ +======= ginkgo -r --progress \ +>>>>>>> master --randomizeAllSpecs --randomizeSuites \ --failOnPending \ --cover \ --trace \ +<<<<<<< HEAD + --race \ + --progress +======= --race +>>>>>>> master @printf "\n" diff --git a/README.md b/README.md index dedd6e4..fdcd4e1 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,50 @@ [![CI](https://github.com/hieuvp/gotemplate-fmt/workflows/CI/badge.svg?branch=master)](https://github.com/hieuvp/gotemplate-fmt/actions?query=workflow%3ACI+branch%3Amaster) +<<<<<<< HEAD +> The Golang Templates Formatter. + +======= +>>>>>>> master ## Table of Contents +<<<<<<< HEAD +- [Installation](#installation) +- [Usages](#usages) +- [Supported File Formats](#supported-file-formats) +======= +>>>>>>> master - [License](#license) +<<<<<<< HEAD +## Installation + +```shell script +GO111MODULE=on go get github.com/hieuvp/gotemplate-fmt +``` + +## Usages + +```shell script +gotemplate-fmt . +``` + +## Supported File Formats + +Make sure that you're using one of the following formats: + +- `.gohtml` +- `.goyaml` +- `.tpl` +- `.tmpl` + +======= +>>>>>>> master ## License MIT diff --git a/install.dockerfile b/install.dockerfile new file mode 100644 index 0000000..a623b54 --- /dev/null +++ b/install.dockerfile @@ -0,0 +1,4 @@ +FROM golang:latest + +RUN GO111MODULE=on go get github.com/hieuvp/gotemplate-fmt +RUN gotemplate-fmt diff --git a/scripts/docker-install.sh b/scripts/docker-install.sh new file mode 100755 index 0000000..2c4f2ed --- /dev/null +++ b/scripts/docker-install.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -eou pipefail + +readonly IMAGE_NAME=gotemplate-fmt +readonly DOCKERFILE_NAME=install.dockerfile + +# Cleanup resources +cleanup() { + docker system prune --force + docker rmi --force "$IMAGE_NAME" +} + +set -x + +cleanup + +docker build \ + --tag "$IMAGE_NAME" \ + --file "$DOCKERFILE_NAME" . + +docker run --rm "$IMAGE_NAME" + +cleanup + +### Put this into GitHub Workflows