Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: install #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

<<<<<<< HEAD
- [Installation](#installation)
- [Usages](#usages)
- [Supported File Formats](#supported-file-formats)
=======
>>>>>>> master
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

<<<<<<< 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
4 changes: 4 additions & 0 deletions install.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM golang:latest

RUN GO111MODULE=on go get github.com/hieuvp/gotemplate-fmt
RUN gotemplate-fmt
26 changes: 26 additions & 0 deletions scripts/docker-install.sh
Original file line number Diff line number Diff line change
@@ -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