Sfoglia il codice sorgente

Run pyinstaller build as normal user

... and test build on CI so we don't break it again!

Fixes #503

Signed-off-by: Ben Firshman <[email protected]>
Ben Firshman 11 anni fa
parent
commit
b4fbab4b56
3 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. 3 0
      Dockerfile
  2. 2 2
      script/build-linux
  3. 3 0
      wercker.yml

+ 3 - 0
Dockerfile

@@ -1,5 +1,6 @@
 FROM debian:wheezy
 RUN apt-get update -qq && apt-get install -qy python python-pip python-dev git && apt-get clean
+RUN useradd -d /home/user -m -s /bin/bash user
 WORKDIR /code/
 
 ADD requirements.txt /code/
@@ -10,3 +11,5 @@ RUN pip install -r requirements-dev.txt
 
 ADD . /code/
 RUN python setup.py install
+
+RUN chown -R user /code/

+ 2 - 2
script/build-linux

@@ -3,5 +3,5 @@ set -ex
 mkdir -p `pwd`/dist
 chmod 777 `pwd`/dist
 docker build -t fig .
-docker run -v `pwd`/dist:/code/dist fig pyinstaller -F bin/fig
-docker run -v `pwd`/dist:/code/dist fig dist/fig --version
+docker run -u user -v `pwd`/dist:/code/dist fig pyinstaller -F bin/fig
+docker run -u user -v `pwd`/dist:/code/dist fig dist/fig --version

+ 3 - 0
wercker.yml

@@ -7,3 +7,6 @@ build:
     - script:
         name: run tests
         code: script/test
+    - script:
+        name: build binary
+        code: script/build-linux