From 56cac09a18ed2e7d7d9190a1c6c81903531ad4a4 Mon Sep 17 00:00:00 2001 From: pipelinebuilder_pel7x64builder0 Date: Sat, 16 Oct 2021 12:28:17 +0200 Subject: [PATCH] drone update to add drone-cli Signed-off-by: pipelinebuilder_pel7x64builder0 --- SPECS/drone.spec | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/SPECS/drone.spec b/SPECS/drone.spec index bbdf10e..c1fe8c5 100644 --- a/SPECS/drone.spec +++ b/SPECS/drone.spec @@ -8,6 +8,11 @@ BuildRequires: golang #Requires: +%description +Drone is a Continuous Delivery platform +built on Docker, written in Go. + + %package server Summary: Documentation files for %{name} Group: Documentation @@ -29,9 +34,10 @@ Group: Controller Controller for the Drone CI Server -%description -Drone is a Continuous Delivery platform -built on Docker, written in Go. +%package cli +Summary: CLI for Drone Server +%description cli +CLI For Drone CI Server %prep @@ -39,17 +45,22 @@ built on Docker, written in Go. mkdir -p src/github.com/drone cd src/github.com/drone git clone https://github.com/drone/drone +git clone https://github.com/drone/drone-cli %build export GOPATH=`pwd` export GO111MODULE=on -cd src/github.com/drone/drone +pushd src/github.com/drone/drone git checkout v%{version} export CGO_ENABLED=0 -go build -v -tags 'oss nolimit' -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o drone-server github.com/drone/drone/cmd/drone-server -go build -v -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o drone-agent github.com/drone/drone/cmd/drone-agent -go build -v -ldflags "-s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -buildid %{version}" -o drone-controller github.com/drone//drone/cmd/drone-controller +go build -v -tags "oss nolimit" -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-server github.com/drone/drone/cmd/drone-server +go build -v -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-agent github.com/drone/drone/cmd/drone-agent +go build -v -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-controller github.com/drone//drone/cmd/drone-controller +popd +pushd src/github.com/drone/drone-cli +go build -v -trimpath -ldflags "-X main.version=%{version} -s -w -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')" -o drone-cli github.com/drone/drone-cli/drone +popd %install @@ -57,6 +68,7 @@ mkdir -p %{buildroot}%{_bindir} cp -v src/github.com/drone/drone/drone-server %{buildroot}%{_bindir} cp -v src/github.com/drone/drone/drone-agent %{buildroot}%{_bindir} cp -v src/github.com/drone/drone/drone-controller %{buildroot}%{_bindir} +cp -v src/github.com/drone/drone-cli/drone-cli %{buildroot}%{_bindir} %files @@ -74,5 +86,8 @@ cp -v src/github.com/drone/drone/drone-controller %{buildroot}%{_bindir} %{_bindir}/drone-controller +%files cli +%{_bindir}/drone-cli + %changelog