diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..25ec560 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,214 @@ +version: 2.1 + +jobs: + + build-ubuntu-disco: + docker: + - image: ubuntu:19.04 + steps: + - run: + name: Install dependencies + command: | + apt-get update + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: "Pull submodules" + command: | + git submodule init + git submodule update --remote + - run: + name: Create the .deb package + command: | + ./install/linux/build_deb.py + dpkg -i deb_dist/dangerzone_*-1_all.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/disco deb_dist/dangerzone_${VERSION}-1.dsc + + build-ubuntu-eoan: + docker: + - image: ubuntu:19.10 + steps: + - run: + name: Install dependencies + command: | + apt-get update + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: "Pull submodules" + command: | + git submodule init + git submodule update --remote + - run: + name: Create the .deb package + command: | + ./install/linux/build_deb.py + dpkg -i deb_dist/dangerzone_*-1_all.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/ubuntu/eoan deb_dist/dangerzone_${VERSION}-1.dsc + + build-debian-buster: + docker: + - image: debian:buster + steps: + - run: + name: Install dependencies + command: | + apt-get update + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: "Pull submodules" + command: | + git submodule init + git submodule update --remote + - run: + name: Create the .deb package + command: | + ./install/linux/build_deb.py + dpkg -i deb_dist/dangerzone_*-1_all.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/debian/buster deb_dist/dangerzone_${VERSION}-1.dsc + + build-debian-bullseye: + docker: + - image: debian:bullseye + steps: + - run: + name: Install dependencies + command: | + apt-get update + apt-get install -y git ssh ruby-dev rubygems python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg + gem install --no-ri --no-rdoc rake + gem install --no-ri --no-rdoc package_cloud + - checkout + - run: + name: "Pull submodules" + command: | + git submodule init + git submodule update --remote + - run: + name: Create the .deb package + command: | + ./install/linux/build_deb.py + dpkg -i deb_dist/dangerzone_*-1_all.deb + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1_all.deb + package_cloud push firstlookmedia/code/debian/bullseye deb_dist/dangerzone_${VERSION}-1.dsc + + build-fedora-30: + docker: + - image: fedora:30 + steps: + - run: + name: Install dependencies + command: | + dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-appdirs python3-click python3-pyxdg python3-requests + gem install package_cloud + - checkout + - run: + name: "Pull submodules" + command: | + git submodule init + git submodule update --remote + - run: + name: Create the .rpm package + command: | + ./install/linux/build_rpm.py + dnf install -y dist/dangerzone-*-1.noarch.rpm + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/fedora/30 dist/dangerzone-${VERSION}-1.noarch.rpm + package_cloud push firstlookmedia/code/fedora/30 dist/dangerzone-${VERSION}-1.src.rpm + + build-fedora-31: + docker: + - image: fedora:31 + steps: + - run: + name: Install dependencies + command: | + dnf install -y git openssh ruby-devel make automake gcc gcc-c++ rpm-build qt5-devel python3-qt5 python3-appdirs python3-click python3-pyxdg python3-requests + gem install package_cloud + - checkout + - run: + name: "Pull submodules" + command: | + git submodule init + git submodule update --remote + - run: + name: Create the .rpm package + command: | + ./install/linux/build_rpm.py + dnf install -y dist/dangerzone-*-1.noarch.rpm + - run: + name: Deploy to packagecloud.io + command: | + VERSION=$(cat dangerzone/__init__.py |grep "dangerzone_version = " |cut -d '"' -f2) + package_cloud push firstlookmedia/code/fedora/31 dist/dangerzone-${VERSION}-1.noarch.rpm + package_cloud push firstlookmedia/code/fedora/31 dist/dangerzone-${VERSION}-1.src.rpm + +workflows: + version: 2 + build-tags: + jobs: + - build-ubuntu-disco: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-ubuntu-eoan: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-debian-buster: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-debian-bullseye: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-fedora-30: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ + - build-fedora-31: + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ diff --git a/BUILD.md b/BUILD.md index 824f050..6170dd3 100644 --- a/BUILD.md +++ b/BUILD.md @@ -12,7 +12,7 @@ git submodule update Install dependencies: ```sh -sudo apt install -y python-all python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg +sudo apt install -y python-all dh-python python3-stdeb docker.io python3 python3-pyqt5 python3-appdirs python3-click python3-xdg python3-requests ``` Run from source tree: @@ -32,7 +32,7 @@ Create a .deb: Install dependencies: ```sh -sudo dnf install -y rpm-build python3 python3-qt5 python3-appdirs python3-click +sudo dnf install -y rpm-build python3 python3-qt5 python3-appdirs python3-click python3-pyxdg python3-requests ``` Run from source tree: diff --git a/dangerzone/__init__.py b/dangerzone/__init__.py index 06bcb36..a655fb5 100644 --- a/dangerzone/__init__.py +++ b/dangerzone/__init__.py @@ -15,7 +15,7 @@ from .docker_installer import ( DockerInstaller, ) -dangerzone_version = "0.1.0" +dangerzone_version = "0.0.1" class Application(QtWidgets.QApplication): diff --git a/install/linux/build_rpm.py b/install/linux/build_rpm.py index dc243da..fa157ab 100755 --- a/install/linux/build_rpm.py +++ b/install/linux/build_rpm.py @@ -39,7 +39,7 @@ def main(): "python3", "setup.py", "bdist_rpm", - "--requires=python3-qt5,python3-appdirs,python3-click", + "--requires=python3-qt5,python3-appdirs,python3-click,python3-pyxdg,python3-requests", ] ) diff --git a/setup.py b/setup.py index 07666b5..cb51b09 100644 --- a/setup.py +++ b/setup.py @@ -32,10 +32,10 @@ setuptools.setup( ("share/dangerzone/container", file_list("share/container")), ("share/dangerzone/container/scripts", file_list("share/container/scripts")), ], - classifiers=( + classifiers=[ "Programming Language :: Python", "Intended Audience :: End Users/Desktop", "Operating System :: OS Independent", - ), + ], entry_points={"console_scripts": ["dangerzone = dangerzone:main"]}, ) diff --git a/stdeb.cfg b/stdeb.cfg index cc6c6d6..ac83fd5 100644 --- a/stdeb.cfg +++ b/stdeb.cfg @@ -1,6 +1,6 @@ [DEFAULT] Package3: dangerzone -Depends3: docker.io, python3, python3-pyqt5, python3-appdirs, python3-click, python3-xdg +Depends3: docker.io, python3, python3-pyqt5, python3-appdirs, python3-click, python3-xdg, python3-requests Build-Depends: python3, python3-all Suite: bionic X-Python3-Version: >= 3.7 \ No newline at end of file