update to 0.5.5
OBS-URL: https://build.opensuse.org/package/show/devel:kubic/kor?expand=0&rev=46
This commit is contained in:
commit
66c293d783
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
24
_service
Normal file
24
_service
Normal file
@ -0,0 +1,24 @@
|
||||
<services>
|
||||
<service name="obs_scm" mode="manual">
|
||||
<param name="url">https://github.com/yonahd/kor</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="revision">v0.5.5</param>
|
||||
<!-- the helm-related tag kor-0.1.xx is sitting on the same commit... -->
|
||||
<param name="match-tag">v0.5.5</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual">
|
||||
</service>
|
||||
<service name="go_modules" mode="manual">
|
||||
</service>
|
||||
<!-- services below are running at buildtime -->
|
||||
<service name="tar" mode="buildtime">
|
||||
</service>
|
||||
<service name="recompress" mode="buildtime">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/yonahd/kor</param>
|
||||
<param name="changesrevision">67f662c4ad92750ec49c7b2d8ba17f90c7e20b5e</param></service></servicedata>
|
3
kor-0.5.2.obscpio
Normal file
3
kor-0.5.2.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:57aeaaa8381e57aea09c4c26cb4ec12a66e983a1b05eb9e0870efa5e81b25675
|
||||
size 789004
|
3
kor-0.5.3.obscpio
Normal file
3
kor-0.5.3.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b5d31a79d834921789e7e6a0d53cca087cc814689b023dcde7a70385f510c2aa
|
||||
size 797196
|
3
kor-0.5.4.obscpio
Normal file
3
kor-0.5.4.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c70bcb72953cfe9a35ae720741976b0e3c4e81ddb042216d624c09623df2802c
|
||||
size 799756
|
3
kor-0.5.5.obscpio
Normal file
3
kor-0.5.5.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a21e8967195900b50e34a79aa3e2905cf72d099e1ba5597b8fd294117a63598
|
||||
size 803852
|
310
kor.changes
Normal file
310
kor.changes
Normal file
@ -0,0 +1,310 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 21 06:33:40 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.5.5:
|
||||
* Chart bump 0.5.5 (#352)
|
||||
* Tests: add tests for multi functionality (#351)
|
||||
* fix: Multi output grouping by namespace (#349)
|
||||
* chore(deps): bump github.com/prometheus/client_golang (#345)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.30.3 to
|
||||
0.31.0 (#346)
|
||||
* Docs: update helm installation (#343)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 06 05:53:28 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.5.4:
|
||||
* chore: update chart version pre-release (#342)
|
||||
* Feat: Enhance unused jobs discovery (#336)
|
||||
* docs(README): Update release badges & ClusterRole aggregation
|
||||
(#340)
|
||||
* revert: Update chart release workflow (#339)
|
||||
* Update chart release workflow (#338)
|
||||
* update chart version 0.5.3 (#337)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 26 04:44:10 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.5.3:
|
||||
* feat: Deduplicate exceptions workflow (#332)
|
||||
* chore: move slack to utils directory (#327)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.30.2 to
|
||||
0.30.3 (#331)
|
||||
* feat: consider ingress and egress rules for networkpolicies
|
||||
(#310)
|
||||
* fix(workflow): move chart release workflow and fix fetch-depth
|
||||
bug (#326)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 03 16:36:27 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.5.2:
|
||||
* Fix: Add filters to replicasets (#324)
|
||||
* fix(multi): Support grouping by resource in multi resource mode
|
||||
(#320)
|
||||
* fix(delete): Refactor input handling & output display on
|
||||
resource deletion (#323)
|
||||
* feat: add CI step to package and publish Helm chart (#306)
|
||||
* update readme to show unused reason (#317)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 19 04:46:26 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.5.1:
|
||||
* feat: Add OpenShift exceptions (#311)
|
||||
* fix: remove reason shorthand (#314)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 18 11:26:38 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.5.0:
|
||||
* feat: find unused networkpolicies (#296)
|
||||
* Feat: show unused reason (#278)
|
||||
* fix(image): Centered kor logo image (#308)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.30.1 to
|
||||
0.30.2 (#301)
|
||||
* chore(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1
|
||||
(#304)
|
||||
* feat: add regex in resource exceptions (#277)
|
||||
* refactor(cmd): standardize subcommand aliases with kubectl
|
||||
shortnames (#300)
|
||||
* Feature: exception sorting as makefile targets (#298)
|
||||
* Add script to find kor exceptions (#294)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 07 19:38:02 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.4.2:
|
||||
* fix(pdb): fix nil pointer in pdb when selector.matchLabels is
|
||||
nil (#297)
|
||||
* style: add GitHub action to validate exceptions JSON sorting
|
||||
(#295)
|
||||
* feat: add helm chart testing (#293)
|
||||
* fix(helm): Add missing labels key in metadata (#292)
|
||||
* feat: add AWS EKS defaults (#291)
|
||||
* chore: Add 'kor' to .gitignore (#290)
|
||||
* Feat: add failed jobs as unused (#283)
|
||||
* docs: add values.yaml descriptions to README.md (#281)
|
||||
* chore(pull_request_template): Update PR template (#282)
|
||||
* chore(charts): run helm-docs (#280)
|
||||
* feat: add K3S exceptions (#270)
|
||||
* fix(formatOutput): fix spacing between tables (#269)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 23 19:44:30 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.4.1:
|
||||
* Feat: add failed jobs as unused (#283)
|
||||
* docs: add values.yaml descriptions to README.md (#281)
|
||||
* chore(pull_request_template): Update PR template (#282)
|
||||
* chore(charts): run helm-docs (#280)
|
||||
* feat: add K3S exceptions (#270)
|
||||
* fix(formatOutput): fix spacing between tables (#269)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.30.0 to
|
||||
0.30.1 (#275)
|
||||
* chore(deps): bump github.com/fatih/color from 1.16.0 to 1.17.0
|
||||
(#274)
|
||||
* feat(helm): Add Extra Labels to Helm Chart for Enhanced
|
||||
Metadata Management (#265)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 05:13:41 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.4.0:
|
||||
* chore(deps): bump github.com/prometheus/client_golang (#264)
|
||||
* feat: allow grouping options for output (#256)
|
||||
* Add Kind exceptions (#263)
|
||||
* Support -e as shortened flag for --exclude-namespaces (#261)
|
||||
* feat: add AKS exceptions (#260)
|
||||
* fix(GetUnusedAll): skip non-namespaced resources if
|
||||
--include-namespaces flag is used (#258)
|
||||
* fix: refactor exceptions into seperate files (#257)
|
||||
* feat: add GKE exceptions (#252)
|
||||
* ci: skip running go checks when no relevant files were changed
|
||||
(#254)
|
||||
* chore: add github pr template (#251)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 02 07:21:00 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.3.8:
|
||||
* refactor: map false minikube unused resources (#241)
|
||||
* refactor: configure golangci-lint and upgrade github actions
|
||||
(#246)
|
||||
* chore: upgrade go version to 1.22.0 (#250)
|
||||
* feat(image): build multi-arch image (#247)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.29.3 to
|
||||
0.30.0 (#244)
|
||||
* Docs: Add CRDs to exceptions (#234)
|
||||
* Add unused pods to getUnusedAllNamespaced (#231)
|
||||
* Feat: Add support for multiple resources in Exporter function
|
||||
(#229)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 25 07:45:19 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.3.7:
|
||||
* Fix: exclude multi (#228)
|
||||
* Fixed GetUnusedAll() JSON concatenation (#227)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.29.2 to
|
||||
0.29.3 (#222)
|
||||
* fix: ClusterRole Aggregation (#221)
|
||||
* feat: unused StorageClasses (#216)
|
||||
* chore(deps): bump github.com/prometheus/client_golang (#217)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 16 14:00:04 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.3.6:
|
||||
* feat: krew plugin workflow (#214)
|
||||
* fix: when using -n option dont get all namespaces (#215)
|
||||
* feat: add mark as unused label (#212)
|
||||
* Feat: Added version subcommand (#210)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 20:51:10 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.3.5:
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.29.1 to
|
||||
0.29.2 (#207)
|
||||
* feat: add clusterrole support (#198)
|
||||
* docs: Update readme to reflect current state (#204)
|
||||
* Added CONTRIBUTING.md (#203)
|
||||
* Feat: added support for unused DaemonSets (#199)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 09 19:18:00 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.3.4:
|
||||
* Added missing resources and separated cluster-scoped resources
|
||||
(#202)
|
||||
* Fix: refactored mismatching deletion resource types (#201)
|
||||
* Fix typo: corrected 'confimgmaps.go' to 'configmaps.go' (#196)
|
||||
* Refactor some codes, add filter objects, and add support for
|
||||
lable filtering... (#194)
|
||||
* Fix typo: corrected 'retreive' to 'retrieve' (#195)
|
||||
* refactor: remove unused "resourceMap" from GetUnusedCrds func
|
||||
(#193)
|
||||
* Version print only if table (#192)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.29.0 to
|
||||
0.29.1 (#188)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 15 16:52:51 UTC 2024 - opensuse_buildservice@ojkastl.de
|
||||
|
||||
- Update to version 0.3.3:
|
||||
* Add finalizer subcommand (#172)
|
||||
* chore(deps): bump github.com/prometheus/client_golang (#185)
|
||||
* feat: add replicaset cleaner (#180)
|
||||
* chore(deps): bump k8s.io/apiextensions-apiserver from 0.28.4 to
|
||||
0.29.0 (#182)
|
||||
* chore(deps): bump k8s.io/client-go from 0.28.4 to 0.29.0 (#183)
|
||||
* Fix spaces and lots labels. (#177)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 10 19:15:44 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.3.2:
|
||||
* Add labels to all templates. (#174)
|
||||
* Fix command in templates. (#175)
|
||||
* Fix exporterInterval variable. (#176)
|
||||
* feat: find evicted pods (#173)
|
||||
* feat: add jobs cleaner (#168)
|
||||
* Add discord server to Readme (#171)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 30 09:08:31 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.3.1:
|
||||
* fix ingress flag as used (#169)
|
||||
* Feat: Find unused pv (#163)
|
||||
* feat:add version flag to ldflags and print version in banner
|
||||
(#158)
|
||||
* Bump k8s.io/apiextensions-apiserver from 0.28.3 to 0.28.4
|
||||
(#162)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 16 12:10:47 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.3.0:
|
||||
* feat: add inUse label prompt for non deleted resources (#150)
|
||||
* add ability to discover projected secrets (#156)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 14 12:09:19 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.2.9:
|
||||
* doc: add verbose flag (#154)
|
||||
* fix: fix output banner for yaml and json (#153)
|
||||
* fix incorrect example namespace flags (#152)
|
||||
* fix: fix output for yaml and json, banner (#149)
|
||||
* chore: add missing filters to service and SA (#148)
|
||||
* fix: make verbose logs a flag (#147)
|
||||
* chore: cleanup unused and remove dup (#146)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 13 06:34:40 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.2.8:
|
||||
* Crd Readme and multi support (#144)
|
||||
* Bump github.com/fatih/color from 1.15.0 to 1.16.0 (#143)
|
||||
* Refactor the GetUnusedMulti function (#142)
|
||||
* chore: update to golang 1.21 and scratch (#141)
|
||||
* feat: add support for linux arm64 (#139)
|
||||
* add support for finding unused CRDs (#134)
|
||||
* grafana dashboard ds selector and repeat kinds (#135)
|
||||
* Fix exporter typo (#133)
|
||||
* fix: clear counter between iterations (#132)
|
||||
* fix: add filter options in export command (#129)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 06 05:45:00 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.2.7:
|
||||
* Document: add delete flag in Readme (#127)
|
||||
* Bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#126)
|
||||
* fix: Resolve panic error due to redefined flag in kor (#125)
|
||||
* feat: add delete flag (#120)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 01 19:07:35 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.2.6:
|
||||
* feat: add customization and filtering options for finding
|
||||
unused resources (#116)
|
||||
* Add Grafana Dashboard (#118)
|
||||
* Bump sigs.k8s.io/yaml from 1.3.0 to 1.4.0 (#119)
|
||||
* Bump k8s.io/client-go from 0.28.2 to 0.28.3 (#112)
|
||||
* Documentation: update chart with release v0.2.5 (#111)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 20 04:59:42 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.2.5:
|
||||
* Fix: validate HTTP field (#110)
|
||||
* merge functions for configmaps (#108)
|
||||
* Add helm documentation (#104)
|
||||
* Fix: Add helm condition to skip secret manifest creation when
|
||||
slack secrets are not provided (#101)
|
||||
* Bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0
|
||||
(#99)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 13 06:47:11 UTC 2023 - kastl@b1-systems.de
|
||||
|
||||
- Update to version 0.2.4:
|
||||
* Fix: add Logo (#98)
|
||||
* Add Logo (#96)
|
||||
* Update helm charts with deployment support (#90)
|
||||
* Export Prometheus metrics (#87)
|
||||
* Add feature request template
|
||||
* add helm to the installation options (#93)
|
||||
* feat: add send to slack support (#77)
|
||||
* Update installation instructions to README.md (#88)
|
||||
* feat: add helm charts with cronjob support (#78)
|
||||
* style: consistent language (#85)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 13 06:47:00 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- new package kor: Tool to discover unused Kubernetes Resources
|
4
kor.obsinfo
Normal file
4
kor.obsinfo
Normal file
@ -0,0 +1,4 @@
|
||||
name: kor
|
||||
version: 0.5.5
|
||||
mtime: 1724181828
|
||||
commit: 67f662c4ad92750ec49c7b2d8ba17f90c7e20b5e
|
123
kor.spec
Normal file
123
kor.spec
Normal file
@ -0,0 +1,123 @@
|
||||
#
|
||||
# spec file for package kor
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
|
||||
|
||||
Name: kor
|
||||
Version: 0.5.5
|
||||
Release: 0
|
||||
Summary: Tool to discover unused Kubernetes Resources
|
||||
License: MIT
|
||||
URL: https://github.com/yonahd/kor
|
||||
Source: kor-%{version}.tar.gz
|
||||
Source1: vendor.tar.gz
|
||||
BuildRequires: go >= 1.22
|
||||
|
||||
%description
|
||||
Kor is a tool to discover unused Kubernetes resources. Currently, Kor can identify and list unused:
|
||||
- ConfigMaps
|
||||
- Secrets
|
||||
- Services
|
||||
- ServiceAccounts
|
||||
- Deployments
|
||||
- StatefulSets
|
||||
- Roles
|
||||
- HPAs
|
||||
- PVCs
|
||||
- Ingresses
|
||||
- PDBs
|
||||
|
||||
%package -n %{name}-bash-completion
|
||||
Summary: Bash Completion for %{name}
|
||||
Group: System/Shells
|
||||
Requires: %{name} = %{version}
|
||||
Requires: bash-completion
|
||||
Supplements: (%{name} and bash-completion)
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}-bash-completion
|
||||
Bash command line completion support for %{name}.
|
||||
|
||||
%package -n %{name}-fish-completion
|
||||
Summary: Fish Completion for %{name}
|
||||
Group: System/Shells
|
||||
Requires: %{name} = %{version}
|
||||
Supplements: (%{name} and fish)
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}-fish-completion
|
||||
Fish command line completion support for %{name}.
|
||||
|
||||
%package -n %{name}-zsh-completion
|
||||
Summary: Zsh Completion for %{name}
|
||||
Group: System/Shells
|
||||
Requires: %{name} = %{version}
|
||||
Supplements: (%{name} and zsh)
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}-zsh-completion
|
||||
zsh command line completion support for %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -p 1 -a 1
|
||||
|
||||
%build
|
||||
DATE_FMT="+%%Y-%%m-%%dT%%H:%%M:%%SZ"
|
||||
BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u "${DATE_FMT}")
|
||||
go build \
|
||||
-mod=vendor \
|
||||
-buildmode=pie \
|
||||
-ldflags="-X github.com/GoogleContainerTools/kor/pkg/kor/version.version=%{version} -X github.com/GoogleContainerTools/kor/pkg/kor/version.buildDate=$BUILD_DATE" \
|
||||
-o bin/kor
|
||||
|
||||
%install
|
||||
# Install the binary.
|
||||
install -D -m 0755 bin/%{name} "%{buildroot}/%{_bindir}/%{name}"
|
||||
|
||||
# create the bash completion file
|
||||
mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions/
|
||||
%{buildroot}/%{_bindir}/%{name} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name}
|
||||
|
||||
# create the fish completion file
|
||||
mkdir -p %{buildroot}%{_datarootdir}/fish/vendor_completions.d/
|
||||
%{buildroot}/%{_bindir}/%{name} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name}.fish
|
||||
|
||||
# create the zsh completion file
|
||||
mkdir -p %{buildroot}%{_datarootdir}/zsh_completion.d/
|
||||
%{buildroot}/%{_bindir}/%{name} completion zsh > %{buildroot}%{_datarootdir}/zsh_completion.d/_%{name}
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/%{name}
|
||||
|
||||
%files -n %{name}-bash-completion
|
||||
%dir %{_datarootdir}/bash-completion/completions/
|
||||
%{_datarootdir}/bash-completion/completions/%{name}
|
||||
|
||||
%files -n %{name}-fish-completion
|
||||
%dir %{_datarootdir}/fish
|
||||
%dir %{_datarootdir}/fish/vendor_completions.d
|
||||
%{_datarootdir}/fish/vendor_completions.d/%{name}.fish
|
||||
|
||||
%files -n %{name}-zsh-completion
|
||||
%defattr(-,root,root)
|
||||
%dir %{_datarootdir}/zsh_completion.d/
|
||||
%{_datarootdir}/zsh_completion.d/_%{name}
|
||||
|
||||
%changelog
|
3
vendor.tar.gz
Normal file
3
vendor.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3d8d8b441493c9b3324eb73f9c07407b143920847c990cc1a6115af2f98e33e4
|
||||
size 7061245
|
Loading…
Reference in New Issue
Block a user