From 654729b79011aad01efadf8da8dd4517af5a4971 Mon Sep 17 00:00:00 2001 From: Sergey Kalinin Date: Thu, 23 Jul 2020 18:48:26 +0000 Subject: [PATCH] =?UTF-8?q?bitbucket-pipelines.yml=20=D0=BE=D1=82=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=20=D0=BE=D0=BD=D0=BB=D0=B0=D0=B9=D0=BD=20=D0=BD=D0=B0=20?= =?UTF-8?q?Bitbucket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bitbucket-pipelines.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index f914741..ddf1f53 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -9,19 +9,13 @@ pipelines: default: - step: script: - - cd /home/rpmbuild - - whoami - - chmod -R 777 /files - - ./build-rpm.sh - - ls -1 /files | xargs -l bash -c 'curl ftp://nuk-svk.ru --user $FTP_USER:$FTP_PASS --upload-file -' - -#image: atlassian/sftp-deploy:0.5.6 -# variables: -# USER: '' -# SERVER: '' -# REMOTE_PATH: '' -# LOCAL_PATH: '' # Optional. - # SSH_KEY: '' # Optional. - # PASSWORD: '' # Optional. - # EXTRA_ARGS: '' # Optional. - # DEBUG: '' # Optional. \ No newline at end of file + - WORKDIR=/home + - VERSION=$(grep Version rac_gui.tcl | grep -oE '\b[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\b') + - RELEASE=$(grep Release rac_gui.tcl | grep -oE '\b[0-9]{1,3}\b') + - tar czf --exclude=bitbucket-pipelines.yml ${WORKDIR}/rpmbuild/SOURCES/rac-gui-${VERSION}-${RELEASE}.tar.gz * + - cp rac_gui.spec ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec + - sed -i "s/.*Version:.*/Version:\t${VERSION}/" ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec + - sed -i "s/.*Release:.*/Release:\t${RELEASE}/" ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec + - rpmbuild -ba ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec + - curl ftp://nuk-svk.ru --user $FTP_USER:$FTP_PASS --upload-file ${WORKDIR}/rpmbuild/RPMS/noarch/rac-gui-${VERSION}-${RELEASE}.noarch.rpm + - curl ftp://nuk-svk.ru --user $FTP_USER:$FTP_PASS --upload-file ${WORKDIR}/rpmbuild/SRPMS/rac-gui-${VERSION}-${RELEASE}.src.rpm