Skip to content

Commit f41b131

Browse files
ref: Move build configuration from setup.py to pyproject.toml; apply various repo/CI refactors (#602)
1 parent 7ebdb7c commit f41b131

23 files changed

+93
-218
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ body:
88
attributes:
99
label: CLI Version
1010
description: What version of linode-cli are you running? `linode-cli -v`
11-
placeholder: linode-cli 5.24.0 Built off spec version 4.138.0
11+
placeholder: linode-cli 5.24.0 Built from spec version 4.138.0
1212
validations:
1313
required: true
1414
- type: textarea

.github/workflows/e2e-suite-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
python-version: '3.x'
6969

7070
- name: Install Python deps
71-
run: pip install -r requirements.txt -r requirements-dev.txt wheel boto3
71+
run: pip install .[dev,obj]
7272

7373
- name: Install the CLI
7474
run: make install
@@ -158,7 +158,7 @@ jobs:
158158
python-version: '3.x'
159159

160160
- name: Install Python deps
161-
run: pip install -r requirements.txt -r requirements-dev.txt wheel boto3
161+
run: pip install .[obj,dev]
162162

163163
- name: Install the CLI
164164
run: make install

.github/workflows/e2e-suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: pip install certifi -U
3434

3535
- name: Install deps
36-
run: pip install -r requirements.txt -r requirements-dev.txt
36+
run: pip install .[obj,dev]
3737

3838
- name: Install Package
3939
run: make install

.github/workflows/nightly-smoke-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: '3.x'
2222

2323
- name: Install Python deps
24-
run: pip install -r requirements.txt -r requirements-dev.txt wheel boto3
24+
run: pip install .[obj,dev]
2525

2626
- name: Install Linode CLI
2727
run: make install
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,18 @@ jobs:
3434
# This is necessary as we want to ensure that version tags
3535
# are properly formatted before passing them into the
3636
# DockerFile.
37-
- name: Get CLI version
38-
run: |
39-
export CLI_VERSION=$(./version)
40-
echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_OUTPUT
41-
env:
42-
LINODE_CLI_VERSION: ${{ github.event.release.tag_name }}
37+
- uses: actions/github-script@v7
4338
id: cli_version
39+
with:
40+
script: |
41+
let tag_name = '${{ github.event.release.tag_name }}';
42+
43+
if (tag_name.startsWith("v")) {
44+
tag_name = tag_name.slice(1);
45+
}
46+
47+
return tag_name;
48+
result-encoding: string
4449

4550
- name: Build and push to DockerHub
4651
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # [email protected]
@@ -49,7 +54,7 @@ jobs:
4954
file: Dockerfile
5055
platforms: linux/amd64,linux/arm64
5156
push: true
52-
tags: linode/cli:${{ steps.cli_version.outputs.CLI_VERSION }},linode/cli:latest
57+
tags: linode/cli:${{ steps.cli_version.outputs.result }},linode/cli:latest
5358
build-args: |
54-
linode_cli_version=${{ steps.cli_version.outputs.CLI_VERSION }}
59+
linode_cli_version=${{ steps.cli_version.outputs.result }}
5560
github_token=${{ secrets.GITHUB_TOKEN }}

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: install boto3
1717
run: pip3 install boto3
1818
- name: install dependencies
19-
run: pip3 install -r requirements-dev.txt -r requirements.txt
19+
run: pip install .[obj,dev]
2020

2121
- name: run linter
2222
run: make lint

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: pip install certifi -U
2626

2727
- name: Install deps
28-
run: pip install -r requirements.txt -r requirements-dev.txt
28+
run: pip install .[dev]
2929

3030
- name: Install Package
3131
run: make install
@@ -53,7 +53,7 @@ jobs:
5353
run: pip install certifi -U
5454

5555
- name: Install deps
56-
run: pip install -r requirements.txt -r requirements-dev.txt
56+
run: pip install .[dev]
5757

5858
- name: Install Package
5959
shell: pwsh

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ ARG github_token
55

66
WORKDIR /src
77

8-
COPY requirements.txt .
9-
108
RUN apt-get update && \
11-
apt-get install -y make git && \
12-
pip3 install -r requirements.txt && \
13-
pip3 install build
9+
apt-get install -y make git
1410

1511
COPY . .
1612

13+
RUN make requirements
14+
1715
RUN LINODE_CLI_VERSION=$linode_cli_version GITHUB_TOKEN=$github_token make build
1816

1917
FROM python:3.11-slim

Jenkinsfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

MANIFEST.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
include linodecli/data-3
22
include linodecli/oauth-landing-page.html
3-
include linode-cli.sh
4-
include baked_version
5-
include requirements.txt

0 commit comments

Comments
 (0)