Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/copr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ jobs:
run: |
VERSION=${{ steps.version.outputs.version }}
sed -i "s/^Version:.*$/Version: ${VERSION}/" rpmbuild/copia-cli.spec
curl -sL "https://github.com/${{ github.repository }}/archive/v${VERSION}/copia-cli-${VERSION}.tar.gz" \
-o rpmbuild/copia-cli-${VERSION}.tar.gz
gh release download "v${VERSION}" --pattern "copia-cli_${VERSION}_linux_amd64.tar.gz" --output rpmbuild/copia-cli_${VERSION}_linux_amd64.tar.gz
gh release download "v${VERSION}" --pattern "copia-cli_${VERSION}_linux_arm64.tar.gz" --output rpmbuild/copia-cli_${VERSION}_linux_arm64.tar.gz
rpmbuild -bs rpmbuild/copia-cli.spec \
--define "_sourcedir $(pwd)/rpmbuild" \
--define "_srcrpmdir $(pwd)/rpmbuild"
--define "_srcrpmdir $(pwd)/rpmbuild" \
--target x86_64
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Submit to COPR
run: |
Expand Down
13 changes: 7 additions & 6 deletions rpmbuild/copia-cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ Summary: CLI for Copia — source control for industrial automation

License: AGPL-3.0-only
URL: https://%{goipath}
Source0: https://%{goipath}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires: golang >= 1.26
%ifarch x86_64
Source0: https://%{goipath}/releases/download/v%{version}/%{name}_%{version}_linux_amd64.tar.gz
%endif
%ifarch aarch64
Source0: https://%{goipath}/releases/download/v%{version}/%{name}_%{version}_linux_arm64.tar.gz
%endif

%description
copia-cli brings Copia repositories, issues, pull requests, and other
concepts to the terminal next to where you are already working with
git and your code.

%prep
%autosetup -n %{name}-%{version}

%build
go build -ldflags "-s -w -X %{goipath}/internal/build.Version=%{version} -X %{goipath}/internal/build.Date=$(date -u +%%Y-%%m-%%d)" -o %{name} ./cmd/copia-cli
%setup -c

%install
install -Dpm 0755 %{name} %{buildroot}%{_bindir}/%{name}
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parts:
source: .
source-type: local
build-snaps:
- go/1.26/stable
- go/latest/stable
go-buildtags: []
go-generate: []
override-build: |
Expand Down
Loading