Fixed missing MATEMAT_VERSION env var.

This commit is contained in:
s3lph 2018-10-19 22:21:44 +02:00
parent f3c8e140ad
commit e5e51acfb4

View file

@ -10,7 +10,6 @@ stages:
before_script: before_script:
- export MATEMAT_VERSION=$(python -c 'import matemat; print(matemat.__version__)') - export MATEMAT_VERSION=$(python -c 'import matemat; print(matemat.__version__)')
- echo ${MATEMAT_VERSION}
@ -86,14 +85,13 @@ build_archlinux:
image: base/devel:latest # Use an archlinux image instead of the customized debian image. image: base/devel:latest # Use an archlinux image instead of the customized debian image.
script: script:
- pacman -Sy --noconfirm python python-setuptools python-pip python-wheel - pacman -Sy --noconfirm python python-setuptools python-pip python-wheel
- export MATEMAT_VERSION=$(python -c 'import matemat; print(matemat.__version__)')
- cp -r static/ package/archlinux/matemat/usr/lib/matemat/static/ - cp -r static/ package/archlinux/matemat/usr/lib/matemat/static/
- cp -r templates/ package/archlinux/matemat/usr/lib/matemat/templates/ - cp -r templates/ package/archlinux/matemat/usr/lib/matemat/templates/
- python3 setup.py egg_info -d -b +master install --root=package/archlinux/matemat/ --prefix=/usr --optimize=1 - python3 setup.py egg_info -d -b +master install --root=package/archlinux/matemat/ --prefix=/usr --optimize=1
- cd package/archlinux - cd package/archlinux
- mv matemat/usr/bin/matemat matemat/usr/lib/matemat/matemat - mv matemat/usr/bin/matemat matemat/usr/lib/matemat/matemat
- rm -rf matemat/usr/bin - rm -rf matemat/usr/bin
- echo ${MATEMAT_VERSION}
- ls
- sed -re "s/__VERSION__/${MATEMAT_VERSION}/g" -i PKGBUILD - sed -re "s/__VERSION__/${MATEMAT_VERSION}/g" -i PKGBUILD
- sudo -u nobody makepkg --syncdeps - sudo -u nobody makepkg --syncdeps
- mv matemat-${MATEMAT_VERSION}-1-any.pkg.tar.xz "matemat-${MATEMAT_VERSION}+${CI_COMMIT_REF_NAME}-1-any.pkg.tar.xz" - mv matemat-${MATEMAT_VERSION}-1-any.pkg.tar.xz "matemat-${MATEMAT_VERSION}+${CI_COMMIT_REF_NAME}-1-any.pkg.tar.xz"