This commit is contained in:
25
.drone.yml
25
.drone.yml
@@ -4,7 +4,7 @@ name: Build on Multiple Distributions
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: clone-repo
|
- name: clone-repo
|
||||||
image: alpine/git
|
image: alpine/git:latest
|
||||||
commands:
|
commands:
|
||||||
- git clone https://gitea.akshun-lab.uk/akshun/setup-script.git /artifacts
|
- git clone https://gitea.akshun-lab.uk/akshun/setup-script.git /artifacts
|
||||||
volumes:
|
volumes:
|
||||||
@@ -24,24 +24,22 @@ steps:
|
|||||||
- pip install pyinstaller inquirerpy distro
|
- pip install pyinstaller inquirerpy distro
|
||||||
- cd /artifacts
|
- cd /artifacts
|
||||||
- pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py
|
- pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py
|
||||||
- cp /artifacts/dist/setup /artifacts/
|
- cp /artifacts/dist/setup /artifacts/arch-setup
|
||||||
- mv /artifacts/setup /artifacts/arch-setup
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: artifacts
|
- name: artifacts
|
||||||
path: /artifacts
|
path: /artifacts
|
||||||
|
|
||||||
# Debian build
|
# Debian build
|
||||||
- name: build-on-debian
|
- name: build-on-debian
|
||||||
image: debian:stable
|
image: debian:stable-slim
|
||||||
commands:
|
commands:
|
||||||
- apt update && apt upgrade -y
|
- apt-get update && apt-get upgrade -y
|
||||||
- apt install -y git python3 python3-pip binutils
|
- apt-get install -y git python3 python3-pip binutils
|
||||||
- mv /lib/python*/EXTERNALLY-MANAGED .
|
- mv /usr/lib/python*/EXTERNALLY-MANAGED .
|
||||||
- pip install pyinstaller inquirerpy distro
|
- pip install pyinstaller inquirerpy distro
|
||||||
- cd /artifacts
|
- cd /artifacts
|
||||||
- pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py
|
- pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py
|
||||||
- cp /artifacts/dist/setup /artifacts/
|
- cp /artifacts/dist/setup /artifacts/debian-setup
|
||||||
- mv /artifacts/setup /artifacts/debian-setup
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: artifacts
|
- name: artifacts
|
||||||
path: /artifacts
|
path: /artifacts
|
||||||
@@ -50,21 +48,20 @@ steps:
|
|||||||
- name: build-on-fedora
|
- name: build-on-fedora
|
||||||
image: fedora:latest
|
image: fedora:latest
|
||||||
commands:
|
commands:
|
||||||
- dnf up -y
|
- dnf update -y
|
||||||
- dnf install -y git python python-pip binutils
|
- dnf install -y git python python-pip binutils
|
||||||
- pip install inquirerpy distro pyinstaller
|
- pip install inquirerpy distro pyinstaller
|
||||||
- cd /artifacts
|
- cd /artifacts
|
||||||
- pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py
|
- pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py
|
||||||
- cp /artifacts/dist/setup /artifacts/
|
- cp /artifacts/dist/setup /artifacts/fedora-setup
|
||||||
- mv /artifacts/setup /artifacts/fedora-setup
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: artifacts
|
- name: artifacts
|
||||||
path: /artifacts
|
path: /artifacts
|
||||||
|
|
||||||
- name: upload-to-gitea
|
- name: upload-to-gitea
|
||||||
image: alpine/curl
|
image: alpine/curl:latest
|
||||||
commands:
|
commands:
|
||||||
- apk add curl jq
|
- apk add --no-cache curl jq
|
||||||
- |
|
- |
|
||||||
# Ensure required variables are set
|
# Ensure required variables are set
|
||||||
if [ -z "$GITEA_TOKEN" ] || [ -z "$GITEA_SERVER" ]; then
|
if [ -z "$GITEA_TOKEN" ] || [ -z "$GITEA_SERVER" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user