Skip to content

Commit 8770c00

Browse files
authored
Merge pull request #12 from gardenlinux/feat/semver
introduce semantic versioning
2 parents 791fd03 + 3e13563 commit 8770c00

19 files changed

+4353
-1255
lines changed

.github/workflows/dev.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: dev
2+
on:
3+
workflow_dispatch:
4+
push:
5+
paths:
6+
- bin/**
7+
- glrd/**
8+
- tests/**
9+
- poetry.lock
10+
- pyproject.toml
11+
jobs:
12+
test:
13+
name: test
14+
runs-on: "ubuntu-latest"
15+
defaults:
16+
run:
17+
shell: bash
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Install Poetry
21+
uses: snok/install-poetry@v1
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: 3.13
26+
- name: Install GLRD and dependencies
27+
run: poetry install --with dev
28+
- name: Run linter
29+
run: make lint
30+
- name: Run tests
31+
run: make test

.github/workflows/image-dev.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ on:
33
workflow_dispatch:
44
push:
55
tags-ignore:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
- "v[0-9]+.[0-9]+.[0-9]+"
77
paths:
88
- bin/**
99
- glrd/**
10+
- tests/**
1011
- Containerfile
1112
- poetry.lock
1213
- pyproject.toml
@@ -20,7 +21,7 @@ jobs:
2021
strategy:
2122
fail-fast: false
2223
matrix:
23-
arch: [ amd64, arm64 ]
24+
arch: [amd64, arm64]
2425
steps:
2526
- uses: actions/checkout@v4
2627
with:
@@ -41,10 +42,10 @@ jobs:
4142
name: build-${{ matrix.arch }}
4243
path: /tmp/${{ matrix.arch }}-oci.tar
4344
if-no-files-found: error
44-
retention-days: 1
45+
retention-days: 1
4546
push:
4647
name: push
47-
runs-on: 'ubuntu-latest'
48+
runs-on: "ubuntu-latest"
4849
defaults:
4950
run:
5051
shell: bash
@@ -56,12 +57,12 @@ jobs:
5657
uses: actions/download-artifact@v4
5758
with:
5859
name: build-amd64
59-
path: /tmp
60+
path: /tmp
6061
- name: download build-arm64
6162
uses: actions/download-artifact@v4
6263
with:
6364
name: build-arm64
64-
path: /tmp
65+
path: /tmp
6566
- name: podman login
6667
run: |
6768
podman login -u token -p ${{ github.token }} ghcr.io

Makefile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# GLRD Makefile
2+
3+
.PHONY: help install test test-unit test-integration test-all lint clean
4+
5+
help: ## Show this help message
6+
@echo "Available targets:"
7+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
8+
9+
install: ## Install dependencies
10+
poetry install
11+
12+
install-dev: ## Install development dependencies
13+
poetry install --with dev
14+
15+
test: ## Run all tests
16+
poetry run pytest
17+
18+
test-unit: ## Run unit tests only
19+
poetry run pytest -m unit
20+
21+
test-integration: ## Run integration tests only
22+
poetry run pytest -m integration
23+
24+
test-all: ## Run all tests with coverage
25+
poetry run pytest --cov=glrd --cov-report=html --cov-report=term
26+
27+
lint: ## Run linting
28+
poetry run flake8 --max-line-length 110 glrd/ tests/
29+
poetry run black --check glrd/ tests/
30+
poetry run autopep8 --diff --max-line-length 110 -r glrd/ tests/
31+
32+
format: ## Format code
33+
poetry run black glrd/ tests/
34+
35+
clean: ## Clean up temporary files
36+
find . -type f -name "*.pyc" -delete
37+
find . -type d -name "__pycache__" -delete
38+
find . -type d -name "*.egg-info" -exec rm -rf {} +
39+
rm -rf build/
40+
rm -rf dist/
41+
rm -rf htmlcov/
42+
rm -rf .coverage
43+
rm -rf .pytest_cache/

README.md

Lines changed: 87 additions & 71 deletions
Large diffs are not rendered by default.

assets/overview.excalidraw

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -681,11 +681,11 @@
681681
"locked": false,
682682
"fontSize": 20,
683683
"fontFamily": 5,
684-
"text": "releases-stable.json",
684+
"text": "releases-major.json",
685685
"textAlign": "center",
686686
"verticalAlign": "middle",
687687
"containerId": "Ja2YwuSfTNbOWarmcKJvD",
688-
"originalText": "releases-stable.json",
688+
"originalText": "releases-major.json",
689689
"autoResize": true,
690690
"lineHeight": 1.25
691691
},
@@ -866,11 +866,11 @@
866866
"locked": false,
867867
"fontSize": 20,
868868
"fontFamily": 5,
869-
"text": "stable",
869+
"text": "major",
870870
"textAlign": "center",
871871
"verticalAlign": "middle",
872872
"containerId": "l3gC5-Rw97FRtN-srCDfo",
873-
"originalText": "stable",
873+
"originalText": "major",
874874
"autoResize": true,
875875
"lineHeight": 1.25
876876
},
@@ -1019,11 +1019,11 @@
10191019
"locked": false,
10201020
"fontSize": 16,
10211021
"fontFamily": 8,
1022-
"text": "❯ glrd --type stable --version 1312 --output-format yaml\n- name: stable-1312\n type: stable\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type patch --version 1312.0 --output-format yaml\n- name: patch-1312.0\n type: patch\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
1022+
"text": "❯ glrd --type major --version 1312 --output-format yaml\n- name: major-1312\n type: major\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type minor --version 1312.0 --output-format yaml\n- name: minor-1312.0\n type: minor\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
10231023
"textAlign": "left",
10241024
"verticalAlign": "top",
10251025
"containerId": null,
1026-
"originalText": "❯ glrd --type stable --version 1312 --output-format yaml\n- name: stable-1312\n type: stable\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type patch --version 1312.0 --output-format yaml\n- name: patch-1312.0\n type: patch\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
1026+
"originalText": "❯ glrd --type major --version 1312 --output-format yaml\n- name: major-1312\n type: major\n version:\n major: 1312\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700136050\n extended:\n isodate: '2024-05-03'\n timestamp: 1714687200\n eol:\n isodate: '2024-08-03'\n timestamp: 1722636000\n\n❯ glrd --type minor --version 1312.0 --output-format yaml\n- name: minor-1312.0\n type: minor\n version:\n major: 1312\n minor: 0\n lifecycle:\n released:\n isodate: '2023-11-16'\n timestamp: 1700089200\n eol:\n isodate: '2023-11-23'\n timestamp: 1700694000\n git:\n commit: 40b9db2c54c9cac78bcf62a96f5386ac33c1bdab\n commit_short: 40b9db2\n github:\n release: https://github.com/gardenlinux/gardenlinux/releases/tag/1312.0\n\n",
10271027
"autoResize": true,
10281028
"lineHeight": 1.25
10291029
},
@@ -1158,11 +1158,11 @@
11581158
"locked": false,
11591159
"fontSize": 20,
11601160
"fontFamily": 5,
1161-
"text": "releases-patch.json",
1161+
"text": "releases-minor.json",
11621162
"textAlign": "center",
11631163
"verticalAlign": "middle",
11641164
"containerId": "6NPB-pPlaLq_OppZlAFUO",
1165-
"originalText": "releases-patch.json",
1165+
"originalText": "releases-minor.json",
11661166
"autoResize": true,
11671167
"lineHeight": 1.25
11681168
},
@@ -1195,11 +1195,11 @@
11951195
"locked": false,
11961196
"fontSize": 20,
11971197
"fontFamily": 5,
1198-
"text": "patch",
1198+
"text": "minor",
11991199
"textAlign": "center",
12001200
"verticalAlign": "middle",
12011201
"containerId": "pFYx8a7oj8CsnNJHBJ2Qg",
1202-
"originalText": "patch",
1202+
"originalText": "minor",
12031203
"autoResize": true,
12041204
"lineHeight": 1.25
12051205
},
@@ -1584,11 +1584,11 @@
15841584
"locked": false,
15851585
"fontSize": 16,
15861586
"fontFamily": 8,
1587-
"text": "❯ glrd-manage --s3-update \\\n --create stable \\\n --version 1312\nINFO: stable-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create patch \\\n --version 1312.0\nINFO: patch-1312.0 - release will be created.",
1587+
"text": "❯ glrd-manage --s3-update \\\n --create major \\\n --version 1312\nINFO: major-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create minor \\\n --version 1312.0\nINFO: minor-1312.0 - release will be created.",
15881588
"textAlign": "left",
15891589
"verticalAlign": "top",
15901590
"containerId": null,
1591-
"originalText": "❯ glrd-manage --s3-update \\\n --create stable \\\n --version 1312\nINFO: stable-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create patch \\\n --version 1312.0\nINFO: patch-1312.0 - release will be created.",
1591+
"originalText": "❯ glrd-manage --s3-update \\\n --create major \\\n --version 1312\nINFO: major-1312 - release will be created.\n\n❯ glrd-manage --s3-update \\\n --create minor \\\n --version 1312.0\nINFO: minor-1312.0 - release will be created.",
15921592
"autoResize": true,
15931593
"lineHeight": 1.25
15941594
}

assets/overview.png

-8.91 MB
Loading

0 commit comments

Comments
 (0)