16 Commits

Author SHA1 Message Date
5b77604aad Merge pull request #16 from jimeh/release-please--branches--main 2023-04-26 19:18:29 +01:00
github-actions[bot]
ff5cbcb63d chore(main): release 2.3.0 2023-04-26 19:17:53 +01:00
770dad5e32 ci(release): fix docker image build error 2023-04-26 19:14:17 +01:00
c39b4321e3 Merge pull request #15 from jimeh/release-please--branches--main 2023-04-26 19:04:17 +01:00
github-actions[bot]
71d0525714 chore(main): release 2.3.0 2023-04-26 18:03:13 +00:00
a02e372f2a Merge pull request #14 from jimeh/add-go-version-info 2023-04-26 19:02:49 +01:00
5500933689 feat(version): add Go version to version output 2023-04-26 19:01:11 +01:00
61f987a007 Merge pull request #13 from jimeh/chart-releaser 2023-04-26 18:57:30 +01:00
1a9e060f1e ci(release/chart): add chart-releaser to release step 2023-04-26 18:55:32 +01:00
9da6bec077 Merge pull request #12 from jimeh/maintenance 2023-04-26 18:32:46 +01:00
438a238547 chore(deps): upgrade to Go 1.20 2023-04-26 18:31:29 +01:00
37bcb99917 ci(release): improve release-please and release jobs 2023-04-26 18:24:38 +01:00
dfe6ce7c24 refactor(release-please): minor tweak to config structure 2023-04-26 18:21:55 +01:00
7194697384 Merge pull request #11 from jimeh/release-please--branches--main 2023-03-10 22:28:36 +00:00
github-actions[bot]
ab03da73fe chore(main): release 2.2.0 2023-03-10 22:26:58 +00:00
7faab1863b feat(license): change license to CC0 1.0 Universal 2023-03-10 22:24:48 +00:00
11 changed files with 205 additions and 75 deletions

2
.cr.yaml Normal file
View File

@@ -0,0 +1,2 @@
---
release-name-template: "v{{ .Version }}"

View File

@@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version: 1.19 go-version: "1.20"
- name: Install dependencies - name: Install dependencies
run: go mod download run: go mod download
- name: Build binary - name: Build binary
@@ -27,46 +27,69 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: azure/setup-helm@v3 - uses: azure/setup-helm@v3
with: with:
token: "${{ secrets.GITHUB_TOKEN }}" token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint chart - name: Lint chart
run: helm lint chart run: helm lint chart
- name: Template chart - name: Template chart
run: helm template chart run: helm template chart
release-please: release-please:
name: Release Please
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build, helm-lint]
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0
version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0
all: ${{ toJSON(steps.release-please.outputs) }}
steps: steps:
- uses: google-github-actions/release-please-action@v3 - uses: google-github-actions/release-please-action@v3
id: release-please id: release-please
with: with:
command: manifest command: manifest
- if: ${{ steps.release-please.outputs.release_created }}
uses: actions/checkout@v3 release:
runs-on: ubuntu-latest
needs: [build, helm-lint, release-please]
if: needs.release-please.outputs.release_created
steps:
- uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- if: ${{ steps.release-please.outputs.release_created }} - run: git fetch --force --tags
name: Set up QEMU - name: Configure Git
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
- if: ${{ steps.release-please.outputs.release_created }} - uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v2 - name: Docker Login
- if: ${{ steps.release-please.outputs.release_created }}
name: Docker Login
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ steps.release-please.outputs.release_created }} - uses: actions/setup-go@v4
uses: actions/setup-go@v3
with: with:
go-version: 1.19 go-version: "1.20"
- if: ${{ steps.release-please.outputs.release_created }} - name: Run GoReleaser
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v2
with: with:
version: latest version: latest
args: release --rm-dist args: release --rm-dist
env: env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package chart
run: helm package ./chart -d .cr-release-packages
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1
with:
config: .cr.yaml
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -47,8 +47,8 @@ changelog:
dockers: dockers:
- image_templates: - image_templates:
- "ghcr.io/jimeh/casecmp:{{ .Version }}-amd64" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64"
- "ghcr.io/jimeh/casecmp:latest-amd64" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
dockerfile: Dockerfile dockerfile: Dockerfile
use: buildx use: buildx
goos: linux goos: linux
@@ -56,8 +56,8 @@ dockers:
build_flag_templates: build_flag_templates:
- "--platform=linux/amd64" - "--platform=linux/amd64"
- image_templates: - image_templates:
- "ghcr.io/jimeh/casecmp:{{ .Version }}-386" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-386"
- "ghcr.io/jimeh/casecmp:latest-386" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-386"
dockerfile: Dockerfile dockerfile: Dockerfile
use: buildx use: buildx
goos: linux goos: linux
@@ -65,8 +65,8 @@ dockers:
build_flag_templates: build_flag_templates:
- "--platform=linux/386" - "--platform=linux/386"
- image_templates: - image_templates:
- "ghcr.io/jimeh/casecmp:{{ .Version }}-arm64" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64"
- "ghcr.io/jimeh/casecmp:latest-arm64" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
use: buildx use: buildx
goos: linux goos: linux
goarch: arm64 goarch: arm64
@@ -74,8 +74,8 @@ dockers:
build_flag_templates: build_flag_templates:
- "--platform=linux/arm64" - "--platform=linux/arm64"
- image_templates: - image_templates:
- "ghcr.io/jimeh/casecmp:{{ .Version }}-armv6" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv6"
- "ghcr.io/jimeh/casecmp:latest-armv6" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv6"
use: buildx use: buildx
goos: linux goos: linux
goarch: arm goarch: arm
@@ -84,8 +84,8 @@ dockers:
build_flag_templates: build_flag_templates:
- "--platform=linux/arm/v6" - "--platform=linux/arm/v6"
- image_templates: - image_templates:
- "ghcr.io/jimeh/casecmp:{{ .Version }}-armv7" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv7"
- "ghcr.io/jimeh/casecmp:latest-armv7" - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv7"
use: buildx use: buildx
goos: linux goos: linux
goarch: arm goarch: arm
@@ -95,17 +95,17 @@ dockers:
- "--platform=linux/arm/v7" - "--platform=linux/arm/v7"
docker_manifests: docker_manifests:
- name_template: ghcr.io/jimeh/casecmp:{{ .Version }} - name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}"
image_templates: image_templates:
- ghcr.io/jimeh/casecmp:{{ .Version }}-amd64 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-amd64"
- ghcr.io/jimeh/casecmp:{{ .Version }}-386 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-386"
- ghcr.io/jimeh/casecmp:{{ .Version }}-arm64 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-arm64"
- ghcr.io/jimeh/casecmp:{{ .Version }}-armv6 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv6"
- ghcr.io/jimeh/casecmp:{{ .Version }}-armv7 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:{{ .Version }}-armv7"
- name_template: ghcr.io/jimeh/casecmp:latest - name_template: "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest"
image_templates: image_templates:
- ghcr.io/jimeh/casecmp:latest-amd64 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-amd64"
- ghcr.io/jimeh/casecmp:latest-386 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-386"
- ghcr.io/jimeh/casecmp:latest-arm64 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-arm64"
- ghcr.io/jimeh/casecmp:latest-armv6 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv6"
- ghcr.io/jimeh/casecmp:latest-armv7 - "{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}:latest-armv7"

View File

@@ -1,3 +1,3 @@
{ {
".": "2.1.0" ".": "2.3.0"
} }

View File

@@ -1,5 +1,19 @@
# Changelog # Changelog
## [2.3.0](https://github.com/jimeh/casecmp/compare/v2.2.0...v2.3.0) (2023-04-26)
### Features
* **version:** add Go version to version output ([5500933](https://github.com/jimeh/casecmp/commit/55009336891b6c281542cf85498abb04816879d3))
## [2.2.0](https://github.com/jimeh/casecmp/compare/v2.1.0...v2.2.0) (2023-03-10)
### Features
* **license:** change license to CC0 1.0 Universal ([7faab18](https://github.com/jimeh/casecmp/commit/7faab1863b48e31e46b763ef7dca0eca1825f6f8))
## [2.1.0](https://github.com/jimeh/casecmp/compare/v2.0.0...v2.1.0) (2022-11-14) ## [2.1.0](https://github.com/jimeh/casecmp/compare/v2.0.0...v2.1.0) (2022-11-14)

121
LICENSE
View File

@@ -1,13 +1,116 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE CC0 1.0 Universal
Version 2, December 2004
Copyright (C) 2018 Jim Myhrberg Statement of Purpose
Everyone is permitted to copy and distribute verbatim or modified The laws of most jurisdictions throughout the world automatically confer
copies of this license document, and changing it is allowed as long exclusive Copyright and Related Rights (defined below) upon the creator and
as the name is changed. subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Certain owners wish to permanently relinquish those rights to a Work for the
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION purpose of contributing to a commons of creative, cultural and scientific
works ("Commons") that the public can reliably and without fear of later
claims of infringement build upon, modify, incorporate in other works, reuse
and redistribute as freely as possible in any form whatsoever and for any
purposes, including without limitation commercial purposes. These owners may
contribute to the Commons to promote the ideal of a free culture and the
further production of creative, cultural and scientific works, or to gain
reputation or greater distribution for their Work in part through the use and
efforts of others.
0. You just DO WHAT THE FUCK YOU WANT TO. For these and/or other purposes and motivations, and without any expectation
of additional consideration or compensation, the person associating CC0 with a
Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
and publicly distribute the Work under its terms, with knowledge of his or her
Copyright and Related Rights in the Work and the meaning and intended legal
effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not limited
to, the following:
i. the right to reproduce, adapt, distribute, perform, display, communicate,
and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or likeness
depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data in
a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation thereof,
including any amended or successor version of such directive); and
vii. other similar, equivalent or corresponding rights throughout the world
based on applicable law or treaty, and any national implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention of,
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
and Related Rights and associated claims and causes of action, whether now
known or unknown (including existing as well as future claims and causes of
action), in the Work (i) in all territories worldwide, (ii) for the maximum
duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
the Waiver for the benefit of each member of the public at large and to the
detriment of Affirmer's heirs and successors, fully intending that such Waiver
shall not be subject to revocation, rescission, cancellation, termination, or
any other legal or equitable action to disrupt the quiet enjoyment of the Work
by the public as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason be
judged legally invalid or ineffective under applicable law, then the Waiver
shall be preserved to the maximum extent permitted taking into account
Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
is so judged Affirmer hereby grants to each affected person a royalty-free,
non transferable, non sublicensable, non exclusive, irrevocable and
unconditional license to exercise Affirmer's Copyright and Related Rights in
the Work (i) in all territories worldwide, (ii) for the maximum duration
provided by applicable law or treaty (including future time extensions), (iii)
in any current or future medium and for any number of copies, and (iv) for any
purpose whatsoever, including without limitation commercial, advertising or
promotional purposes (the "License"). The License shall be deemed effective as
of the date CC0 was applied by Affirmer to the Work. Should any part of the
License for any reason be judged legally invalid or ineffective under
applicable law, such partial invalidity or ineffectiveness shall not
invalidate the remainder of the License, and in such case Affirmer hereby
affirms that he or she will not (i) exercise any of his or her remaining
Copyright and Related Rights in the Work or (ii) assert any associated claims
and causes of action with respect to the Work, in either case contrary to
Affirmer's express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or warranties
of any kind concerning the Work, express, implied, statutory or otherwise,
including without limitation warranties of title, merchantability, fitness
for a particular purpose, non infringement, or the absence of latent or
other defects, accuracy, or the present or absence of errors, whether or not
discoverable, all to the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without limitation
any person's Copyright and Related Rights in the Work. Further, Affirmer
disclaims responsibility for obtaining any necessary consents, permissions
or other rights required for any use of the Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to this
CC0 or use of the Work.
For more information, please see
<http://creativecommons.org/publicdomain/zero/1.0/>

View File

@@ -1,22 +1,7 @@
# casecmp # casecmp
Case-insensitive string comparison, as an API. Because ¯\\_(ツ)\_/¯ Case-insensitive string comparison, as an API. Because ¯\\\_(ツ)\_/¯
## License ## License
``` [CC0 1.0 Universal](http://creativecommons.org/publicdomain/zero/1.0/)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2018 Jim Myhrberg
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
```

View File

@@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.1.0 # x-release-please-version version: 2.3.0 # x-release-please-version
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: 2.1.0 # x-release-please-version appVersion: 2.3.0 # x-release-please-version

2
go.mod
View File

@@ -1,3 +1,3 @@
module github.com/jimeh/casecmp module github.com/jimeh/casecmp
go 1.19 go 1.20

View File

@@ -9,6 +9,7 @@ import (
"log" "log"
"net/http" "net/http"
"os" "os"
"runtime"
"strconv" "strconv"
"strings" "strings"
"text/template" "text/template"
@@ -154,6 +155,8 @@ func printVersion() {
buffer.WriteString(fmt.Sprintf(" (%s)", commit)) buffer.WriteString(fmt.Sprintf(" (%s)", commit))
} }
buffer.WriteString(fmt.Sprintf(", built with %s", runtime.Version()))
fmt.Println(buffer.String()) fmt.Println(buffer.String())
} }

View File

@@ -1,10 +1,10 @@
{ {
"release-type": "go",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"packages": { "packages": {
".": { ".": {
"release-type": "go",
"changelog-path": "CHANGELOG.md", "changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false, "draft": false,
"prerelease": false, "prerelease": false,
"extra-files": [ "extra-files": [