Skip to content

Commit

Permalink
Prepare v2.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ffurrer2 committed Sep 3, 2022
1 parent a55880b commit 3ee9700
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 38 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:

- name: Setup task
run: |
set -euo pipefail
sudo bash -c 'curl -fsSL https://taskfile.dev/install.sh | bash -s -- -b /usr/local/bin v${{ env.TASK_VERSION }}'
- name: Setup GoReleaser
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Security

## [2.0.0] - 2022-09-03

### Added

- Added flag (`-r/--reverse) to sort in reverse order
- Added additional flags to the filter command

### Changed

- Changed the default behaviour of the filter command. Pre-release versions and versions containing build metadata are no longer printed by default.

## [1.8.0] - 2022-08-25

### Changed
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ scoop install semver
### Build from source

```shell
go install github.com/ffurrer2/semver/cmd/semver@latest
go install github.com/ffurrer2/semver/v2/cmd/semver@latest
```

## Usage
Expand All @@ -44,6 +44,7 @@ Usage:

Available Commands:
compare Compare semantic versions
completion Generate the autocompletion script for the specified shell
filter Filter semantic versions
format Format and print semantic versions
help Help about any command
Expand Down Expand Up @@ -107,9 +108,10 @@ $ echo $?

```console
$ semver version
semver version 1.0.0
commit: 224394b9d709277fe5e4965a6633535c597cd2ed
built at: 2020-06-18T20:22:25Z
semver version: 1.8.0
built at: 2022-08-25T12:40:39Z
git commit: 10c573e1ec0a6aa302c6ace2d995793139ebc1e6
git tree state: clean
```

## License
Expand Down
6 changes: 3 additions & 3 deletions build/package/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ builds:
gobinary: go
command: build
ldflags:
- -X github.com/ffurrer2/semver/internal/pkg/app.version={{.Version}}
- -X github.com/ffurrer2/semver/internal/pkg/app.date={{.Date}}
- -X github.com/ffurrer2/semver/internal/pkg/app.commit={{.Commit}}
- -X github.com/ffurrer2/semver/v2/internal/pkg/app.version={{.Version}}
- -X github.com/ffurrer2/semver/v2/internal/pkg/app.date={{.Date}}
- -X github.com/ffurrer2/semver/v2/internal/pkg/app.commit={{.Commit}}
- -s
- -w
flags:
Expand Down
2 changes: 1 addition & 1 deletion cmd/semver/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"os"

"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/semver/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
package main

import (
"github.com/ffurrer2/semver/internal/pkg/cli"
"github.com/ffurrer2/semver/internal/pkg/predicate"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/cli"
"github.com/ffurrer2/semver/v2/internal/pkg/predicate"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/semver/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"text/template"

"github.com/ffurrer2/semver/internal/pkg/cli"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/cli"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/semver/major.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main
import (
"os"

"github.com/ffurrer2/semver/internal/pkg/cli"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/cli"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/semver/minor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main
import (
"os"

"github.com/ffurrer2/semver/internal/pkg/cli"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/cli"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/semver/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main
import (
"os"

"github.com/ffurrer2/semver/internal/pkg/cli"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/cli"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/semver/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"sort"

"github.com/ffurrer2/semver/internal/pkg/cli"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/cli"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/semver/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main
import (
"os"

"github.com/ffurrer2/semver/internal/pkg/cli"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/cli"
"github.com/ffurrer2/semver/v2/pkg/semver"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/semver/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package main

import (
"github.com/ffurrer2/semver/internal/pkg/app"
"github.com/ffurrer2/semver/v2/internal/pkg/app"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// SPDX-License-Identifier: MIT
module github.com/ffurrer2/semver
module github.com/ffurrer2/semver/v2

go 1.19

retract v1.7.0 // Published accidentally

require (
github.com/onsi/ginkgo/v2 v2.1.6
github.com/onsi/gomega v1.20.2
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/number/number_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"math/bits"

"github.com/ffurrer2/semver/internal/pkg/number"
"github.com/ffurrer2/semver/v2/internal/pkg/number"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/predicate/predicate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package predicate_test

import (
"github.com/ffurrer2/semver/internal/pkg/predicate"
"github.com/ffurrer2/semver/v2/internal/pkg/predicate"
. "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/semver/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package semver_test

import (
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/pkg/semver"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/semver/semver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"regexp"
"strings"

"github.com/ffurrer2/semver/internal/pkg/number"
"github.com/ffurrer2/semver/v2/internal/pkg/number"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/semver/semver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sort"
"strings"

"github.com/ffurrer2/semver/internal/pkg/number"
"github.com/ffurrer2/semver/pkg/semver"
"github.com/ffurrer2/semver/v2/internal/pkg/number"
"github.com/ffurrer2/semver/v2/pkg/semver"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
Expand Down
4 changes: 2 additions & 2 deletions scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ branch_name() {
branch_name="$(git rev-parse --abbrev-ref HEAD)"
if [[ ${branch_name} == "HEAD" ]]; then
# Try to determine branch name from GITHUB_REF environment variable (GitHub Actions)
if [[ -n ${GITHUB_REF:-} ]]; then
branch_name="${GITHUB_REF/refs\/heads\//}"
if [[ -n ${GITHUB_REF_NAME:-} ]]; then
branch_name="${GITHUB_REF_NAME}"
# Try to determine branch name from BRANCH_NAME environment variable (Jenkins)
elif [[ -n ${BRANCH_NAME:-} ]]; then
branch_name="${BRANCH_NAME}"
Expand Down
6 changes: 3 additions & 3 deletions tasks/GoTasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ version: '3'
vars:
GO_BUILD_ENV: CGO_ENABLED=0
LDFLAGS: >-
-X github.com/ffurrer2/semver/internal/pkg/app.version={{.BUILD_VERSION}}
-X github.com/ffurrer2/semver/internal/pkg/app.date={{.BUILD_DATE}}
-X github.com/ffurrer2/semver/internal/pkg/app.commit={{.GIT_SHA}}
-X github.com/ffurrer2/semver/v2/internal/pkg/app.version={{.BUILD_VERSION}}
-X github.com/ffurrer2/semver/v2/internal/pkg/app.date={{.BUILD_DATE}}
-X github.com/ffurrer2/semver/v2/internal/pkg/app.commit={{.GIT_SHA}}
-s -w
tasks:
Expand Down

0 comments on commit 3ee9700

Please sign in to comment.