2020-07-23 20:44:33 +03:00
|
|
|
image: svk28/rac-gui-build:centos8
|
2020-07-23 20:42:36 +03:00
|
|
|
|
|
|
|
pipelines:
|
|
|
|
default:
|
|
|
|
- step:
|
|
|
|
script:
|
2020-07-23 21:50:21 +03:00
|
|
|
- WORKDIR=/home/rpmbuild
|
2020-07-23 22:18:50 +03:00
|
|
|
- cd ${WORKDIR}
|
|
|
|
- git clone https://bitbucket.org/svk28/rac-gui.git
|
|
|
|
- VERSION=$(grep Version ${WORKDIR}/rac-gui/rac_gui.tcl | grep -oE '\b[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\b')
|
|
|
|
- RELEASE=$(grep Release ${WORKDIR}/rac-gui/rac_gui.tcl | grep -oE '\b[0-9]{1,3}\b')
|
|
|
|
- tar czf ${WORKDIR}/rpmbuild/SOURCES/rac-gui-${VERSION}-${RELEASE}.tar.gz rac-gui
|
|
|
|
- cp ${WORKDIR}/rac-gui/rac_gui.spec ${WORKDIR}/rpmbuild/SPECS/rac_gui.spec
|
2020-07-23 21:48:26 +03:00
|
|
|
- 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
|