From 92aa39803fc510c440598e45e2c1809d3162d3b5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 21 Apr 2022 02:26:04 +0000
Subject: [PATCH 01/13] Bump github.com/essentialkaos/ek/v12 from 12.43.0 to
12.44.0
Bumps [github.com/essentialkaos/ek/v12](https://github.com/essentialkaos/ek) from 12.43.0 to 12.44.0.
- [Release notes](https://github.com/essentialkaos/ek/releases)
- [Changelog](https://github.com/essentialkaos/ek/blob/master/CHANGELOG.md)
- [Commits](https://github.com/essentialkaos/ek/compare/v12.43.0...v12.44.0)
---
updated-dependencies:
- dependency-name: github.com/essentialkaos/ek/v12
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
go.mod | 4 ++--
go.sum | 17 ++++++++++-------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/go.mod b/go.mod
index e72b314..e00b649 100644
--- a/go.mod
+++ b/go.mod
@@ -4,10 +4,10 @@ go 1.17
require (
github.com/disintegration/imaging v1.6.2
- github.com/essentialkaos/ek/v12 v12.43.0
+ github.com/essentialkaos/ek/v12 v12.44.0
)
require (
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect
- golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
+ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
)
diff --git a/go.sum b/go.sum
index 58b9f83..1cb8bc7 100644
--- a/go.sum
+++ b/go.sum
@@ -1,10 +1,11 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
-github.com/essentialkaos/check v1.2.1 h1:avvyFy/1acUNwfxwuOLsHeCjfXtMygtbu0lVDr3nxFs=
github.com/essentialkaos/check v1.2.1/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
-github.com/essentialkaos/ek/v12 v12.43.0 h1:lnwrfGYQFJ3EjEF4ydW2qnshDcXCR2OnNRk0kwlFpFE=
-github.com/essentialkaos/ek/v12 v12.43.0/go.mod h1:Cv/tOZshmFg4pMJnBkg4aW/WyYhzzc41qzZIfk5RSi4=
+github.com/essentialkaos/check v1.3.0 h1:ria+8o22RCLdt2D/1SHQsEH5Mmy5S+iWHaGHrrbPUc0=
+github.com/essentialkaos/check v1.3.0/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
+github.com/essentialkaos/ek/v12 v12.44.0 h1:sJjccPnaYC2dD3sExBWwwH/35/TQ4DiQqgsH+IGuis4=
+github.com/essentialkaos/ek/v12 v12.44.0/go.mod h1:uQUkpvaZHWR9aI8GfknZqOG5FC+G2PYJLFyMw9fdjbo=
github.com/essentialkaos/go-linenoise/v3 v3.3.5/go.mod h1:g4X3LhT83XT4h7xwrCLclAdMkJvS9qWBQTGNdS6y4vo=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
@@ -13,17 +14,19 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
+github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
+golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 h1:hVwzHzIUGRjiF7EcUjqNxk3NCfkPxbDKRdnNE1Rpg0U=
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 h1:OH54vjqzRWmbJ62fjuhxy7AxFFgoHN0/DPc/UrL8cAs=
-golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
From 715926f1fee4de3b1fa50eb51fb5af3186083dc5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 25 Apr 2022 03:13:29 +0000
Subject: [PATCH 02/13] Bump github.com/essentialkaos/ek/v12 from 12.44.0 to
12.44.1
Bumps [github.com/essentialkaos/ek/v12](https://github.com/essentialkaos/ek) from 12.44.0 to 12.44.1.
- [Release notes](https://github.com/essentialkaos/ek/releases)
- [Changelog](https://github.com/essentialkaos/ek/blob/master/CHANGELOG.md)
- [Commits](https://github.com/essentialkaos/ek/compare/v12.44.0...v12.44.1)
---
updated-dependencies:
- dependency-name: github.com/essentialkaos/ek/v12
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
go.mod | 2 +-
go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/go.mod b/go.mod
index e00b649..4eeeabf 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.17
require (
github.com/disintegration/imaging v1.6.2
- github.com/essentialkaos/ek/v12 v12.44.0
+ github.com/essentialkaos/ek/v12 v12.44.1
)
require (
diff --git a/go.sum b/go.sum
index 1cb8bc7..86874cc 100644
--- a/go.sum
+++ b/go.sum
@@ -4,8 +4,8 @@ github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44am
github.com/essentialkaos/check v1.2.1/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
github.com/essentialkaos/check v1.3.0 h1:ria+8o22RCLdt2D/1SHQsEH5Mmy5S+iWHaGHrrbPUc0=
github.com/essentialkaos/check v1.3.0/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
-github.com/essentialkaos/ek/v12 v12.44.0 h1:sJjccPnaYC2dD3sExBWwwH/35/TQ4DiQqgsH+IGuis4=
-github.com/essentialkaos/ek/v12 v12.44.0/go.mod h1:uQUkpvaZHWR9aI8GfknZqOG5FC+G2PYJLFyMw9fdjbo=
+github.com/essentialkaos/ek/v12 v12.44.1 h1:x9Zk5TVsnCWOR1cmHS81mDrgAGLa1o8VQLdmWg9GoqE=
+github.com/essentialkaos/ek/v12 v12.44.1/go.mod h1:uQUkpvaZHWR9aI8GfknZqOG5FC+G2PYJLFyMw9fdjbo=
github.com/essentialkaos/go-linenoise/v3 v3.3.5/go.mod h1:g4X3LhT83XT4h7xwrCLclAdMkJvS9qWBQTGNdS6y4vo=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
From 47ba13cf9b22a7d48c6d3ebee8792023413b6809 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 26 Apr 2022 03:24:00 +0000
Subject: [PATCH 03/13] Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
---
.github/workflows/codeql.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 0fa9f18..bf5ecc9 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -25,9 +25,9 @@ jobs:
fetch-depth: 2
- name: Initialize CodeQL
- uses: github/codeql-action/init@v1
+ uses: github/codeql-action/init@v2
with:
languages: go
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ uses: github/codeql-action/analyze@v2
From 467789a9017d3e617e56b71246720cb73365e086 Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Thu, 28 Apr 2022 00:52:45 +0300
Subject: [PATCH 04/13] Improve CI workflow
---
.github/workflows/ci.yml | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3a61a63..b21f87b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,7 +13,6 @@ jobs:
env:
SRC_DIR: src/github.com/${{ github.repository }}
- GO111MODULE: auto
strategy:
matrix:
@@ -26,12 +25,6 @@ jobs:
go-version: ${{ matrix.go }}
id: go
- - name: Setup PATH
- run: |
- echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
- echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV"
- echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
-
- name: Checkout
uses: actions/checkout@v3
with:
@@ -80,3 +73,9 @@ jobs:
- name: Build Docker image
run: |
docker build -f Dockerfile -t rsz .
+
+ - name: Show info about built Docker image
+ uses: essentialkaos/docker-info-action@v1
+ with:
+ image: rsz
+ show-labels: true
From 172d53e0eb11e575c0a8c988cefbecf358ee6a9b Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Thu, 28 Apr 2022 00:54:22 +0300
Subject: [PATCH 05/13] Improve CI workflow
---
.github/workflows/ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b21f87b..2c7453c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -42,6 +42,8 @@ jobs:
name: Hadolint
runs-on: ubuntu-latest
+ needs: Go
+
steps:
- name: Checkout
uses: actions/checkout@v3
From 6ab433f5d31723433fca8dd55c858e7e19b132c9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 4 May 2022 02:28:53 +0000
Subject: [PATCH 06/13] Bump github.com/essentialkaos/ek/v12 from 12.44.1 to
12.45.0
Bumps [github.com/essentialkaos/ek/v12](https://github.com/essentialkaos/ek) from 12.44.1 to 12.45.0.
- [Release notes](https://github.com/essentialkaos/ek/releases)
- [Changelog](https://github.com/essentialkaos/ek/blob/master/CHANGELOG.md)
- [Commits](https://github.com/essentialkaos/ek/compare/v12.44.1...v12.45.0)
---
updated-dependencies:
- dependency-name: github.com/essentialkaos/ek/v12
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
go.mod | 2 +-
go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/go.mod b/go.mod
index 4eeeabf..b3e9348 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.17
require (
github.com/disintegration/imaging v1.6.2
- github.com/essentialkaos/ek/v12 v12.44.1
+ github.com/essentialkaos/ek/v12 v12.45.0
)
require (
diff --git a/go.sum b/go.sum
index 86874cc..8d6e0e4 100644
--- a/go.sum
+++ b/go.sum
@@ -4,8 +4,8 @@ github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44am
github.com/essentialkaos/check v1.2.1/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
github.com/essentialkaos/check v1.3.0 h1:ria+8o22RCLdt2D/1SHQsEH5Mmy5S+iWHaGHrrbPUc0=
github.com/essentialkaos/check v1.3.0/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
-github.com/essentialkaos/ek/v12 v12.44.1 h1:x9Zk5TVsnCWOR1cmHS81mDrgAGLa1o8VQLdmWg9GoqE=
-github.com/essentialkaos/ek/v12 v12.44.1/go.mod h1:uQUkpvaZHWR9aI8GfknZqOG5FC+G2PYJLFyMw9fdjbo=
+github.com/essentialkaos/ek/v12 v12.45.0 h1:5KVZl5MAsPwxfjda+wb+cCxneQ747lU9zA5mjCA5Fyg=
+github.com/essentialkaos/ek/v12 v12.45.0/go.mod h1:uQUkpvaZHWR9aI8GfknZqOG5FC+G2PYJLFyMw9fdjbo=
github.com/essentialkaos/go-linenoise/v3 v3.3.5/go.mod h1:g4X3LhT83XT4h7xwrCLclAdMkJvS9qWBQTGNdS6y4vo=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
From be197bc4f68c653ae60784c4f9f8c94f653187bf Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Wed, 4 May 2022 15:52:54 +0300
Subject: [PATCH 07/13] Update for compatibility with the latest version of ek
package
---
rsz.go | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/rsz.go b/rsz.go
index 60f3882..e88e161 100644
--- a/rsz.go
+++ b/rsz.go
@@ -34,7 +34,7 @@ import (
// Basic utility info
const (
APP = "rsz"
- VER = "0.0.3"
+ VER = "0.0.4"
DESC = "Simple utility for image resizing"
)
@@ -176,8 +176,10 @@ func listFilters() {
}
// process starts image processing
-func process(args []string) {
- srcImage, size, outImage := args[0], args[1], args[2]
+func process(args options.Arguments) {
+ srcImage := args.Get(0).Clean().String()
+ size := args.Get(1).String()
+ outImage := args.Get(2).Clean().String()
err := checkSrcImage(srcImage)
From 4234a165b122f1a97ec497e01c65a3df94d2414a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 6 May 2022 03:40:54 +0000
Subject: [PATCH 08/13] Bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)
---
updated-dependencies:
- dependency-name: docker/login-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2c7453c..9b263e4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -64,7 +64,7 @@ jobs:
uses: actions/checkout@v3
- name: Login to DockerHub
- uses: docker/login-action@v1
+ uses: docker/login-action@v2
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
if: ${{ env.DOCKERHUB_USERNAME != '' }}
From b564b29a99fa928bde7d0ac839669a6717833841 Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Tue, 10 May 2022 17:11:39 +0300
Subject: [PATCH 09/13] Add GitHub action for building and pushing images to
GitHub Container Registry (GHCR)
---
.github/workflows/ghcr.yml | 59 ++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 .github/workflows/ghcr.yml
diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml
new file mode 100644
index 0000000..937f0a8
--- /dev/null
+++ b/.github/workflows/ghcr.yml
@@ -0,0 +1,59 @@
+name: "GHCR Publish"
+
+on:
+ release:
+ types: [published]
+
+permissions:
+ packages: write
+ contents: read
+
+env:
+ REGISTRY: ghcr.io
+ IMAGE_NAME: ${{ github.repository }}
+
+jobs:
+ GHCR:
+ name: GHCR Build & Publish
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Login to DockerHub
+ uses: docker/login-action@v2
+ env:
+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
+ if: ${{ env.DOCKERHUB_USERNAME != '' }}
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v2
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@v4
+ with:
+ images: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}
+ flavor: latest=true
+
+ - name: Build and push Docker image
+ uses: docker/build-push-action@v3
+ with:
+ context: .
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+
+ - name: Show info about built Docker image
+ uses: essentialkaos/docker-info-action@v1
+ with:
+ image: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
+ show-labels: true
From 491379179959f4c87bd7529aabf67cfd078ee661 Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Tue, 10 May 2022 17:13:43 +0300
Subject: [PATCH 10/13] Regenerate Makefile with the latest version of
gomakegen
---
Makefile | 70 ++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 55 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
index b24cbbe..db66e96 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
################################################################################
-# This Makefile generated by GoMakeGen 1.5.1 using next command:
+# This Makefile generated by GoMakeGen 2.0.0 using next command:
# gomakegen --mod .
#
# More info: https://kaos.sh/gomakegen
@@ -9,15 +9,21 @@
export GO111MODULE=on
+ifdef VERBOSE ## Print verbose information (Flag)
+VERBOSE_FLAG = -v
+endif
+
+################################################################################
+
.DEFAULT_GOAL := help
-.PHONY = fmt vet all clean deps mod-init mod-update mod-vendor help
+.PHONY = fmt vet all clean deps update init vendor mod-init mod-update mod-download mod-vendor help
################################################################################
all: rsz ## Build all binaries
-rsz: ## Build rsz binary
- go build rsz.go
+rsz:
+ go build $(VERBOSE_FLAG) rsz.go
install: ## Install all binaries
cp rsz /usr/bin/rsz
@@ -25,32 +31,66 @@ install: ## Install all binaries
uninstall: ## Uninstall all binaries
rm -f /usr/bin/rsz
-deps: mod-update ## Download dependencies
+init: mod-init ## Initialize new module
-mod-init: ## Initialize new module
- go mod init
- go mod tidy
+deps: mod-download ## Download dependencies
-mod-update: ## Download modules to local cache
+update: mod-update ## Update dependencies to the latest versions
+
+vendor: mod-vendor ## Make vendored copy of dependencies
+
+mod-init:
+ifdef MODULE_PATH ## Module path for initialization (String)
+ go mod init $(MODULE_PATH)
+else
+ go mod init
+endif
+
+ifdef COMPAT ## Compatible Go version (String)
+ go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
+else
+ go mod tidy $(VERBOSE_FLAG)
+endif
+
+mod-update:
+ifdef UPDATE_ALL ## Update all dependencies (Flag)
+ go get -u $(VERBOSE_FLAG) all
+else
+ go get -u $(VERBOSE_FLAG) ./...
+endif
+
+ifdef COMPAT
+ go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
+else
+ go mod tidy $(VERBOSE_FLAG)
+endif
+
+ test -d vendor && go mod vendor $(VERBOSE_FLAG) || :
+
+mod-download:
go mod download
-mod-vendor: ## Make vendored copy of dependencies
- go mod vendor
+mod-vendor:
+ go mod vendor $(VERBOSE_FLAG)
fmt: ## Format source code with gofmt
find . -name "*.go" -exec gofmt -s -w {} \;
-vet: ## Runs go vet over sources
+vet: ## Runs 'go vet' over sources
go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
clean: ## Remove generated files
rm -f rsz
help: ## Show this info
- @echo -e '\n\033[1mSupported targets:\033[0m\n'
+ @echo -e '\n\033[1mTargets:\033[0m\n'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
- | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}'
+ | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-14s\033[0m %s\n", $$1, $$2}'
+ @echo -e '\n\033[1mVariables:\033[0m\n'
+ @grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
+ | sed 's/ifdef //' \
+ | awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}'
@echo -e ''
- @echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n'
+ @echo -e '\033[90mGenerated by GoMakeGen 2.0.0\033[0m\n'
################################################################################
From cd5f570f039e8eb06d065dfe9539683d91039bf8 Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Tue, 10 May 2022 17:20:32 +0300
Subject: [PATCH 11/13] Improve CI workflow
---
.github/workflows/ci.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9b263e4..3c07985 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,7 +23,6 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- id: go
- name: Checkout
uses: actions/checkout@v3
From e558460feb9ae23ff5697a9f044dbae710b54d19 Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Tue, 10 May 2022 17:24:51 +0300
Subject: [PATCH 12/13] Improve README
---
README.md | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 77fc7c4..21aa6a6 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
-Installation • Command-line completion • Man documentation • Usage • Build Status • Contributing • License
+Installation • Command-line completion • Man documentation • Usage • CI Status • Contributing • License
@@ -21,7 +21,7 @@
To build the `rsz` from scratch, make sure you have a working Go 1.17+ workspace (_[instructions](https://golang.org/doc/install)_), then:
```
-go install github.com/essentialkaos/rsz
+go install github.com/essentialkaos/rsz@latest
```
#### Prebuilt binaries
@@ -32,6 +32,22 @@ You can download prebuilt binaries for Linux and macOS from [EK Apps Repository]
bash <(curl -fsSL https://apps.kaos.st/get) rsz
```
+#### Docker Image
+
+The latest version of `rsz` also available as Docker image on [Docker Hub](https://kaos.sh/d/rsz) and [GitHub Container Registry](https://kaos.sh/p/rsz):
+
+```bash
+docker pull essentialkaos/rsz:latest
+docker run --rm -it essentialkaos/rsz:latest image.png 0.55 thumbnail.png
+```
+
+or
+
+```bash
+docker pull ghcr.io/essentialkaos/rsz:latest
+docker run --rm -it ghcr.io/essentialkaos/rsz:latest image.png 0.55 thumbnail.png
+```
+
### Command-line completion
You can generate completion for `bash`, `zsh` or `fish` shell.
@@ -85,13 +101,12 @@ Examples
rsz image.png 0.55 thumbnail.png
Convert image to relative size (55% of original)
-
```
-### Build Status
+### CI Status
| Branch | Status |
-|--------|----------|
+|--------|--------|
| `master` | [![CI](https://kaos.sh/w/rsz/ci.svg?branch=master)](https://kaos.sh/w/rsz/ci?query=branch:master) |
| `develop` | [![CI](https://kaos.sh/w/rsz/ci.svg?branch=develop)](https://kaos.sh/w/rsz/ci?query=branch:develop) |
From 26744f8e615b37a508d4d7af96fa94bd1b2b5891 Mon Sep 17 00:00:00 2001
From: Anton Novojilov
Date: Tue, 10 May 2022 17:26:42 +0300
Subject: [PATCH 13/13] Improve CodeQL workflow
---
.github/workflows/codeql.yml | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index bf5ecc9..79cc2f0 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -19,15 +19,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- with:
- fetch-depth: 2
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 2
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: go
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: go
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2