Skip to content

Commit

Permalink
Merge pull request #12 from incu6us/feature/snap-package
Browse files Browse the repository at this point in the history
snap package
  • Loading branch information
incu6us authored May 21, 2020
2 parents d3ca200 + 407a366 commit 49b11b2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
run: |
echo "::set-env name=GO_VERSION::$(go version | awk '{print $3;}')"
- name: Login to Snapcraft
uses: samuelmeuli/action-snapcraft@v1
with:
snapcraft_token: ${{ secrets.SNAPCRAFT_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
Expand Down
15 changes: 15 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,18 @@ brews:
system "#{bin}/goimports-reviser -version"
install: |
bin.install "goimports-reviser"
snapcrafts:
- id: goimports-reviser
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
amd64: 64-bit
386: 32-bit
darwin: MacOS
publish: true
summary: "Right imports sorting & code formatting tool"
description: |
Tool for Golang to sort goimports by 3 groups: std, general and project dependencies. Also, formatting for your code will be prepared(so, you don't need to use gofmt or goimports separately).
grade: stable
confinement: strict
license: MIT
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@
![GitHub release (latest by date)](https://img.shields.io/github/v/release/incu6us/goimports-reviser?color=green)
![license](https://img.shields.io/github/license/incu6us/goimports-reviser)

[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/goimports-reviser)


!['logo'](./images/reviser-muscot_200.png)

Tool for Golang to sort goimports by 3 groups: std, general and project dependencies.
Also, formatting for your code will be prepared(so, you don't need to use `gofmt` or `goimports` separately).
Use additional option `-rm-unused` to remove unused imports and `-set-alias` to rewrite import aliases for versioned packages.

## Install
### With Brew
```bash
brew tap incu6us/homebrew-tap
brew install incu6us/homebrew-tap/goimports-reviser
```

### With Snap
```bash
$ brew tap incu6us/homebrew-tap
$ brew install incu6us/homebrew-tap/goimports-reviser
snap install goimports-reviser
```

## How To Use
Expand Down

0 comments on commit 49b11b2

Please sign in to comment.