Skip to content

Commit

Permalink
Merge pull request #100 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 3.0.1
  • Loading branch information
andyone authored Apr 1, 2024
2 parents b2728b7 + ff85c18 commit bdc2983
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 204 deletions.
17 changes: 10 additions & 7 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (
"github.com/essentialkaos/ek/v12/options"
"github.com/essentialkaos/ek/v12/signal"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v12/support"
"github.com/essentialkaos/ek/v12/support/deps"
"github.com/essentialkaos/ek/v12/terminal/tty"
"github.com/essentialkaos/ek/v12/usage"
"github.com/essentialkaos/ek/v12/usage/completion/bash"
Expand All @@ -35,16 +37,14 @@ import (
"github.com/essentialkaos/ek/v12/usage/update"

"github.com/cespare/xxhash"

"github.com/essentialkaos/uc/cli/support"
)

// ////////////////////////////////////////////////////////////////////////////////// //

// Application basic info
const (
APP = "uc"
VER = "3.0.0"
VER = "3.0.1"
DESC = "Tool for counting unique lines"
)

Expand Down Expand Up @@ -154,7 +154,10 @@ func Run(gitRev string, gomod []byte) {
genAbout(gitRev).Print(options.GetS(OPT_VER))
os.Exit(0)
case options.GetB(OPT_VERB_VER):
support.Print(APP, VER, gitRev, gomod)
support.Collect(APP, VER).
WithRevision(gitRev).
WithDeps(deps.Extract(gomod)).
Print()
os.Exit(0)
case options.GetB(OPT_HELP):
genUsage().Print()
Expand Down Expand Up @@ -511,13 +514,13 @@ func genAbout(gitRev string) *usage.About {
VersionColorTag: colorTagVer,
DescSeparator: "{s}—{!}",

License: "Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>",
BugTracker: "https://github.com/essentialkaos/uc",
UpdateChecker: usage.UpdateChecker{"essentialkaos/uc", update.GitHubChecker},
License: "Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>",
BugTracker: "https://github.com/essentialkaos/uc",
}

if gitRev != "" {
about.Build = "git:" + gitRev
about.UpdateChecker = usage.UpdateChecker{"essentialkaos/uc", update.GitHubChecker}
}

return about
Expand Down
189 changes: 0 additions & 189 deletions cli/support/support.go

This file was deleted.

7 changes: 6 additions & 1 deletion common/uc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Summary: Simple utility for counting unique lines
Name: uc
Version: 3.0.0
Version: 3.0.1
Release: 0%{?dist}
Group: Applications/System
License: Apache License, Version 2.0
Expand Down Expand Up @@ -93,6 +93,11 @@ fi
################################################################################

%changelog
* Thu Mar 28 2024 Anton Novojilov <[email protected]> - 3.0.1-0
- Improved support information gathering
- Code refactoring
- Dependencies update

* Mon Feb 19 2024 Anton Novojilov <[email protected]> - 3.0.0-0
- crc64 replaced by xxhash
- Added different output formats for distribution info
Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ go 1.18

require (
github.com/cespare/xxhash v1.1.0
github.com/essentialkaos/depsy v1.1.0
github.com/essentialkaos/ek/v12 v12.100.0
github.com/essentialkaos/ek/v12 v12.113.1
)

require golang.org/x/sys v0.17.0 // indirect
require (
github.com/essentialkaos/depsy v1.1.0 // indirect
golang.org/x/sys v0.18.0 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk=
github.com/essentialkaos/depsy v1.1.0 h1:U6dp687UkQwXlZU17Hg2KMxbp3nfZAoZ8duaeUFYvJI=
github.com/essentialkaos/depsy v1.1.0/go.mod h1:kpiTAV17dyByVnrbNaMcZt2jRwvuXClUYOzpyJQwtG8=
github.com/essentialkaos/ek/v12 v12.100.0 h1:bup8cqsUUXJtKHAgdt2eHjYKBFU/0rPbg/us2H1E46I=
github.com/essentialkaos/ek/v12 v12.100.0/go.mod h1:VjMWDJ1r4HsfBYJuCNDUo4R1lhCgYkFZOMOH0S3W6iM=
github.com/essentialkaos/ek/v12 v12.113.1 h1:3opV9dwRpIQq1fqg5mkaSEt6ogECL4VLzrH/829qeYg=
github.com/essentialkaos/ek/v12 v12.113.1/go.mod h1:SslW97Se34YQKc08Ume2V/8h/HPTgLS1+Iok64cNF/U=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

0 comments on commit bdc2983

Please sign in to comment.