Added user feature to upload.sh
parent
29a6924e01
commit
51a524ffa4
|
@ -3,20 +3,18 @@ image: python:3.5
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
- deploy
|
#~ - deploy
|
||||||
# - review
|
# - review
|
||||||
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
#~ - apt-get update && apt-get -y install gcc libmagickwand-dev make
|
- apt-get update && apt-get -y install git-lfs
|
||||||
|
- git lfs install
|
||||||
- pip3 install -U pip setuptools wheel
|
- pip3 install -U pip setuptools wheel
|
||||||
- pip3 install -r requirements.txt
|
- pip3 install -r requirements.txt
|
||||||
- python3 setup.py build_ext -i #Need the C++ extension only.
|
- python3 setup.py build_ext -i #Need the C++ extension only.
|
||||||
- mkdir testpath
|
- mkdir testpath
|
||||||
|
|
||||||
after_script:
|
|
||||||
- rm -rf dist build docs/build openlut.egg-info
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
|
@ -39,15 +37,16 @@ build_docs:
|
||||||
test:
|
test:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
|
- git lfs pull
|
||||||
- python3 tests/suite.py
|
- python3 tests/suite.py
|
||||||
|
|
||||||
deploy_docs:
|
#~ deploy_docs:
|
||||||
stage: deploy
|
#~ stage: deploy
|
||||||
environment:
|
#~ environment:
|
||||||
name: Documentation
|
#~ name: Documentation
|
||||||
url: https://www.sofusrose.com/openlut
|
#~ url: https://www.sofusrose.com/openlut
|
||||||
script:
|
#~ script:
|
||||||
- docs/upload.sh
|
#~ - docs/upload.sh
|
||||||
#~ when: manual
|
#~ when: manual
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
REMOTE=sofus@wakingnexus
|
USER="$1"
|
||||||
|
if [ -z $USER ]; then USER="sofus"; fi
|
||||||
|
|
||||||
|
REMOTE="${USER}@wakingnexus"
|
||||||
|
|
||||||
#Remove the old docs.
|
#Remove the old docs.
|
||||||
ssh $REMOTE 'bash -s' << 'ENDSSH'
|
ssh $REMOTE 'bash -s' << 'ENDSSH'
|
||||||
|
@ -15,7 +18,7 @@ rsync -avzP build/html/* $REMOTE:/var/www/openlut/
|
||||||
#Set strong permissions.
|
#Set strong permissions.
|
||||||
ssh $REMOTE 'bash -s' << 'ENDSSH'
|
ssh $REMOTE 'bash -s' << 'ENDSSH'
|
||||||
|
|
||||||
chown -R sofus:www-data /var/www/openlut/*
|
chown -R $USER:www-data /var/www/openlut/*
|
||||||
find /var/www/openlut -type f -exec chmod 0640 {} \;
|
find /var/www/openlut -type f -exec chmod 0640 {} \;
|
||||||
find /var/www/openlut -type d -exec chmod 2750 {} \;
|
find /var/www/openlut -type d -exec chmod 2750 {} \;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue