File argocd-diff-preview.spec of Package argocd-diff-preview

#
# spec file for package argocd-diff-preview
#
# 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/
#


Name:           argocd-diff-preview
Version:        0.0.24
Release:        0
Summary:	Tool for rendering manifest changes on pull requests
License:        Apache-2.0
URL:            https://github.com/dag-andersen/argocd-diff-preview
Source0:        %{name}-%{version}.tar.gz
Source1:        vendor.tar.zst
# https://github.com/dag-andersen/argocd-diff-preview/issues/62
# comes from main branch, as 0.0.24 did not contain the license
Source2:        https://raw.githubusercontent.com/dag-andersen/argocd-diff-preview/refs/heads/main/LICENSE
BuildRequires:  cargo
BuildRequires:  cargo-packaging
BuildRequires:  zstd

%description
Argo CD Diff Preview is a tool that renders the diff between two branches in a
Git repository. It is designed to render manifests generated by Argo CD,
providing a clear and concise view of the changes between two branches. It
operates similarly to Atlantis for Terraform, creating a plan that outlines the
proposed changes.

%prep
%autosetup -p 1 -a 1

cp %{SOURCE2} .

%build
%{cargo_build}

%install
install -D -d -m 0755 %{buildroot}%{_bindir}
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/%{name} %{buildroot}%{_bindir}/%{name}

%check
%{cargo_test}

%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}

%changelog
openSUSE Build Service is sponsored by