Skip to content

Commit

Permalink
Merge pull request #3 from AbsaOSS/bump-v060
Browse files Browse the repository at this point in the history
v0.6.0 bump
  • Loading branch information
kuritka authored Apr 15, 2021
2 parents 7975af4 + a804f98 commit c95e145
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ lint:
golangci-lint run

license:
go install github.com/AbsaOSS/golic@v0.5.0
go install github.com/AbsaOSS/golic@v0.6.0
golic inject -c="2021 Absa Group Limited"
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ golic inject -c="2021 MyCompany ltd." --dry
Install and run **GOLIC**
```shell
# GO 1.16
go install github.com/AbsaOSS/golic@v0.5.0
go install github.com/AbsaOSS/golic@v0.6.0
golic version
```
Golic has two configurations `.licignore` and `.golic.yaml`. The first determines which
Expand Down Expand Up @@ -72,18 +72,22 @@ Usually you want to find out that something went wrong during CI / CD. For examp
In terms of golic, we want the build pipe to end with an error if we find at least one file with a missing license.
The `-x` argument handles that.
```shell
go install github.com/AbsaOSS/golic@v0.5.0
go install github.com/AbsaOSS/golic@v0.6.0
golic inject --dry -x -t apache2
```

## Updating license
The moment you need to change or delete the license text, the `remove` command comes into play.
`remove` uses exactly the same flags as `inject`, but unlike `inject`, it deletes the license from all files
determined by `.licignore`. Because GoLic has no state, the `remove` command deletes based on the criteria
specified in the configuration and `.licignore`, so the configuration of deleted licenses must be the same as
the configuration that injected them.
The moment you need to change or delete the license text, the `remove` command comes into play. It deletes license
depending on `.golic.yaml` and `.licignore`. If you want to update the license (e.g. the text in the license needs to be changed),
you must first remove the license and then re-inject the updated version. I highly recommend using the `--dry`argument
before removing the license.
```shell
golic remove --dry -t apache2
# updating apacheX license
# remove apacheX license from the source
golic remove -t apacheX
# now update apacheX in .golic.yaml and inject back
golic inject -t apacheX
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/spf13/cobra"
)

const version = "v0.5.0"
const version = "v0.6.0"

var versionCmd = &cobra.Command{
Use: "version",
Expand Down

0 comments on commit c95e145

Please sign in to comment.