Verified Commit 2b723217 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Added CI configuration to build CLI for linux

parent 6fa0ffc8
Pipeline #4199 passed with stage
in 29 seconds
stages:
- test
- build
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
......@@ -17,3 +18,47 @@ test:
- pytest
tags:
- docker
build-linux:
stage: build
image: python:3.6
before_script:
- pip install .[dev]
script:
- pyinstaller --clean -y cli.spec --distpath .
- echo "Testing the generated CLI works…" && ./funkwhale --help && echo "funkwhale CLI working \o/"
artifacts:
name: "linux_${CI_COMMIT_REF_NAME}"
paths:
- funkwhale
only:
- tags@funkwhale/cli
- master@funkwhale/cli
tags:
- docker
build-windows:
# there is a weird Gitlab / windows interaction
# cf https://github.com/cdrx/docker-pyinstaller/issues/38
# so we cannot use the regular docker executor
stage: build
image: docker:stable
tags:
- docker-build
variables:
# CI_DEBUG_TRACE: "true"
script:
- docker run --rm -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3 "pip install -r requirements-dev.txt && pyinstaller --clean -y cli.spec --distpath ."
- docker run --rm -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3 "echo 'Testing the generated CLI works…' && wine ./funkwhale.exe --help && echo 'funkwhale CLI working \o/'"
artifacts:
name: "linux_${CI_COMMIT_REF_NAME}"
paths:
- funkwhale.exe
only:
- tags@funkwhale/cli
- master@funkwhale/cli
tags:
- docker-build
......@@ -2,15 +2,33 @@ A command line interface to interact with Funkwhale servers.
# Installation
We provide some prebuilt binaries for Windows and Linux.
On Linux:
```
curl -L "https://dev.funkwhale.audio/funkwhale/cli/-/jobs/artifacts/master/raw/funkwhale?job=build-linux" -o /usr/local/bin/funkwhale
chmod +x /usr/local/bin/funkwhale
```
On Windows:
```
curl -L "https://dev.funkwhale.audio/funkwhale/cli/-/jobs/artifacts/master/raw/funkwhale.exe?job=build-windows" -o funkwhale.exe
```
# Usage
``funkwhale --help``
# Installation (from source)
This cli requires python 3.6 or greater:
git clone https://dev.funkwhale.audio/funkwhale/cli.git
cd cli
pip install .
# Usage
``funkwhale --help``
# Build the binary
......
aiofiles
aiohttp
appdirs
click
click-log
keyring
marshmallow
python-dotenv
semver
tabulate
tqdm
pathvalidate
aioresponses
asynctest
ipdb
pytest
pytest-mock
pytest-env
pyinstaller
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment