Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Averell7 committed Jun 27, 2019
2 parents fdb3de3 + e701d3e commit b0f2dbe
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 48 deletions.
64 changes: 35 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
language: python

sudo: required
python:
# - "2.7"
- "3.4"
before_install:
- sudo apt-get install -y tree
- sudo apt-get install -y rpm
- sudo apt-get install -y alien
- sudo apt-get install -y python3-gi
- sudo apt-get install -y python3-gi-cairo
- sudo apt-get install -y gir1.2-gtk-3.0
- sudo apt-get install -y gir1.2-poppler-0.18

# - sudo ls /home/travis/virtualenv/python3.5.2/lib/python3.5

install:
# - pip install flake8 tox
- sudo pip install pyinstaller
- sudo pip install pysftp
- whereis pyinstaller
# - ls /usr/share


script:
- nosetests
- sudo python build.py
- ls
- cd dist
- ls

- '3.4'
before_install:
- sudo apt-get install -y tree
- sudo apt-get install -y rpm
- sudo apt-get install -y alien
- sudo apt-get install -y python3-gi
- sudo apt-get install -y python3-gi-cairo
- sudo apt-get install -y gir1.2-gtk-3.0
- sudo apt-get install -y gir1.2-poppler-0.18
- sudo apt-get install -y fakeroot
install:
- sudo pip install pyinstaller
- sudo pip install pysftp
- whereis pyinstaller
script:
- nosetests
- python build.py
- ls
- cd dist
- ls
- cd ..
deploy:
skip_cleanup: true
overwrite: true
provider: releases
api_key:
secure: pxqF0sLkmvkWy+EzC4brEzAnmP1hCnyLv/UgleSiZomURfRfudR6nGFAiVjvAf5tWpKQdmsbaxqo1C3rajMqlrgw2TXs93wVPF3IsmBrs2qKzXbq92g/C19o7/kgk9NlA6vs/S2KL60aBe9WR46rKKbo9gaUM4heYcZqwaXfq4tSTI8cwHmMaZ8wIY2va4J4rxptjHlIvApuRhFHzG7ng4Mmh8mJBDKoevOmT3R6PdO626CooCRtnZHBs3hfqHGSxGlCHPMMaEFJI1MXvYtWaP6zOlOePoxjBWKFk1hP+IPvb65/K8/iUZQ7FK+X+KQuHe0pyieO4QMSqKiVlJgXM4SXSNm+VGbmqXDXyBhoesU6jr6TWUTPTB2ZF5QFPTGgUyV14GrlAxRkWRMsk4BN/vJMIts2fuz6niVbXUSTA5yj6IKcLhflsmzC7j6Z8QjCdv9y6wGKtSzDqWtQUuIPbT5AJNCfEIjwNSFWzEyhhv06crILZFt12moGchtXkIegfy1ymOTr8Mvd8PidIoYsXJnUuBr2+dxfHFRphmZMd4afg0jWBWQRFGnmkR1RKQPPxh+VcZAAMZ9DncTK4xsRk7pcMJ8r7jMHXXBe02yXRLpJGq8uGZwgyjxtRkZV8jJeEqAd/pcwEuAJFnWSqDDeUpOHnIS5w4oL2xwGppgQR08=
file:
- "dist/*.rpm"
- "dist/*.tar.gz"
- "dist/*.deb"
file_glob: true
on:
tags: true
repo: Averell7/PdfBooklet
26 changes: 7 additions & 19 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
import glob
import ftplib
from ftplib import FTP
import pysftp
# import pysftp
import zipfile

pyinstaller_file = ""

version = "3.1.0"
print ("\n\n ================ start bdist =============================\n\n")
os.system('sudo python3 setup.py bdist > /dev/null')
os.system('python3 setup.py bdist > /dev/null')
print ("\n\n ================ end bdist - start sdist =================\n\n")
os.system('sudo python3 setup.py sdist > /dev/null')
os.system('python3 setup.py sdist > /dev/null')
print ("\n\n ================ end sdist - start bdist_rpm =============\n\n")
os.system('sudo python3 setup.py bdist_rpm > /dev/null')
os.system('python3 setup.py bdist_rpm > /dev/null')
# dependencies are set in the setup.cfg file
print ("\n\n ================ end bdist_rpm ===========================\n\n")

Expand Down Expand Up @@ -78,7 +78,7 @@



os.system('sudo alien --generate --scripts ' + rpm_file)
os.system('alien --generate --scripts ' + rpm_file)
new_dir = "./pdfbooklet-" + version + "/"

os.chdir(new_dir)
Expand All @@ -105,13 +105,13 @@
# correct pdfbooklet.cfg

pb_dir = "./usr/share/pdfbooklet/"
text = "sudo chmod 777 " + pb_dir
text = "chmod 777 " + pb_dir
# I am unsure of the right place of this file, so let us put it in both places
os.system(" echo " + text + "> ./postinst")
os.system(" echo " + text + "> ./debian/postinst")

# Build debian package
os.system("sudo dpkg-buildpackage")
os.system("dpkg-buildpackage")
os.chdir("..")


Expand Down Expand Up @@ -158,15 +158,3 @@

print("\n\n ================ End of build.py =======================\n\n")


#ftp = FTP("ftp.online.net") # connect to host, default port
ftp = pysftp.Connection("ftp.online.net","[email protected]", "sRhf45cU_d")
#ftp.login("[email protected]", "sRhf45cU_d")
i = 1
for build_file in [rpm_file, tar_file, tar64_file, deb_file]:
print build_file
#ftp.storbinary('STOR ' + build_file, f1) # send the file
print(sending(os.path.split(build_file)[1]))
ftp.put(build_file, "/" + os.path.split(build_file)[1])


0 comments on commit b0f2dbe

Please sign in to comment.