Skip to content

Commit 2a43fab

Browse files
authored
chore: merge v1.4.0 content from dev to main for the release (#29)
1 parent 2bbed0e commit 2a43fab

37 files changed

Lines changed: 2796 additions & 2808 deletions

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
__pycache__/
44
*.py[cod]
55

6-
data/
7-
shares/
6+
/data/
7+
/shares/
88

99
docker-compose.yml
1010

.github/workflows/release.yml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,49 @@ on:
1111
jobs:
1212
verify-and-release:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1416
steps:
1517
- name: Checkout code
16-
uses: actions/checkout@v4
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1719
with:
1820
fetch-depth: 0
1921
fetch-tags: true
22+
persist-credentials: false
2023

2124
- name: Validate tag format
2225
run: |
23-
TAG="${{ github.event.inputs.tag }}"
26+
TAG="${GITHUB_EVENT_INPUTS_TAG}"
2427
if [[ ! $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2528
echo "❌ Invalid tag format. Expected format: v1.2.3"
2629
exit 1
2730
fi
2831
echo "✅ Tag format is valid: $TAG"
32+
env:
33+
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}
2934

3035
- name: Verify tag exists
3136
run: |
32-
TAG="${{ github.event.inputs.tag }}"
37+
TAG="${GITHUB_EVENT_INPUTS_TAG}"
3338
if ! git rev-parse --verify "refs/tags/$TAG" >/dev/null 2>&1; then
3439
echo "❌ Tag '$TAG' does not exist in the repository"
3540
echo "Available tags:"
3641
git tag --sort=-version:refname | head -10
3742
exit 1
3843
fi
3944
echo "✅ Tag '$TAG' exists"
45+
env:
46+
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}
4047

4148
- name: Checkout specific tag
4249
run: |
43-
git checkout ${{ github.event.inputs.tag }}
50+
git checkout ${GITHUB_EVENT_INPUTS_TAG}
51+
env:
52+
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}
4453

4554
- name: Verify GPG signature on tag
4655
run: |
47-
TAG="${{ github.event.inputs.tag }}"
56+
TAG="${GITHUB_EVENT_INPUTS_TAG}"
4857
4958
# Force fetch the complete tag object (not just commit reference)
5059
echo "=== Fetching Tag Object ==="
@@ -72,49 +81,61 @@ jobs:
7281
7382
# Cleanup
7483
rm /tmp/pubkey.asc
84+
env:
85+
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}
7586

7687
- name: Get version from tag
7788
id: get_version
7889
run: |
79-
TAG="${{ github.event.inputs.tag }}"
90+
TAG="${GITHUB_EVENT_INPUTS_TAG}"
8091
VERSION=${TAG#v}
8192
echo "version=$VERSION" >> $GITHUB_OUTPUT
8293
echo "tag=$TAG" >> $GITHUB_OUTPUT
94+
env:
95+
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}
8396

8497
- name: Package repository
8598
run: |
8699
mkdir -p dist
87100
88101
# Create source package
89-
zip -r dist/fractum-${{ steps.get_version.outputs.version }}-source.zip \
102+
zip -r dist/fractum-${STEPS_GET_VERSION_OUTPUTS_VERSION}-source.zip \
90103
src/ \
91104
packages/ \
105+
tests/ \
92106
bootstrap-*.sh \
93107
bootstrap-*.ps1 \
94108
Dockerfile \
109+
.dockerignore \
110+
assets \
95111
setup.py \
96112
README.md \
97113
LICENSE \
98114
--exclude="*.pyc" \
99115
--exclude="__pycache__/*" \
116+
--exclude="*.DS_Store" \
100117
--exclude=".git/*"
101118
102119
# Create checksums
103120
cd dist
104-
sha256sum fractum-${{ steps.get_version.outputs.version }}-source.zip > checksums.txt
121+
sha256sum fractum-${STEPS_GET_VERSION_OUTPUTS_VERSION}-source.zip > checksums.txt
122+
env:
123+
STEPS_GET_VERSION_OUTPUTS_VERSION: ${{ steps.get_version.outputs.version }}
105124

106125
- name: Extract release notes from tag
107126
id: release_notes
108127
run: |
109-
TAG="${{ github.event.inputs.tag }}"
128+
TAG="${GITHUB_EVENT_INPUTS_TAG}"
110129
# Extract release notes from signed tag message
111130
NOTES=$(git tag -l --format='%(contents)' $TAG)
112131
echo "notes<<EOF" >> $GITHUB_OUTPUT
113132
echo "$NOTES" >> $GITHUB_OUTPUT
114133
echo "EOF" >> $GITHUB_OUTPUT
134+
env:
135+
GITHUB_EVENT_INPUTS_TAG: ${{ github.event.inputs.tag }}
115136

116137
- name: Create GitHub Release
117-
uses: softprops/action-gh-release@v2.2.2
138+
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
118139
with:
119140
tag_name: ${{ steps.get_version.outputs.tag }}
120141
name: Fractum ${{ steps.get_version.outputs.tag }}
@@ -155,6 +176,9 @@ jobs:
155176

156177
- name: Update website release info
157178
run: |
158-
echo "🚀 Released Fractum ${{ steps.get_version.outputs.version }}"
159-
echo "Tag: ${{ steps.get_version.outputs.tag }}"
160-
echo "Signature verified: ✅"
179+
echo "🚀 Released Fractum ${STEPS_GET_VERSION_OUTPUTS_VERSION}"
180+
echo "Tag: ${STEPS_GET_VERSION_OUTPUTS_TAG}"
181+
echo "Signature verified: ✅"
182+
env:
183+
STEPS_GET_VERSION_OUTPUTS_VERSION: ${{ steps.get_version.outputs.version }}
184+
STEPS_GET_VERSION_OUTPUTS_TAG: ${{ steps.get_version.outputs.tag }}

.gitignore

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ src.egg-info
44
build
55
env
66
__pycache__
7+
.pytest_cache
8+
.ruff_cache
79
.python-version
810
.venv
9-
data
10-
shares/
11+
/data
12+
/shares/
13+
14+
# Tooling local — ne pas committer
15+
.claude/
16+
_bmad/
17+
18+
# Artefacts des outils de scan IA
19+
.vulnhuntr_checkpoint/
20+
vulnhuntr.log
21+
reports/
22+
strix_runs/

Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12.11-slim
1+
FROM python:3.12.11-slim@sha256:47ae396f09c1303b8653019811a8498470603d7ffefc29cb07c88f1f8cb3d19f
22

33
WORKDIR /app
44

@@ -7,11 +7,21 @@ COPY src/ /app/src/
77
COPY tests/ /app/tests/
88
COPY packages/ /app/packages/
99

10-
# Install dependencies
11-
RUN pip install --no-cache-dir -e .
10+
# Install dependencies — verify offline packages if present (M6)
11+
RUN if [ -f packages/CHECKSUMS.sha256 ] && [ -f packages/CHECKSUMS.sha256.asc ]; then \
12+
gpg --verify packages/CHECKSUMS.sha256.asc packages/CHECKSUMS.sha256 \
13+
|| { echo "ERROR: Invalid GPG signature on packages"; exit 1; }; \
14+
fi; \
15+
if [ -f packages/CHECKSUMS.sha256 ]; then \
16+
(cd packages && sha256sum --check CHECKSUMS.sha256 --strict --quiet) \
17+
|| { echo "ERROR: Package hash mismatch"; exit 1; }; \
18+
pip install --no-cache-dir --no-index --find-links=packages -e .; \
19+
else \
20+
pip install --no-cache-dir -e .; \
21+
fi
1222

1323
# Create data directory and shares directory with proper permissions
14-
RUN mkdir -p /data /app/shares && chmod 777 /data /app/shares
24+
RUN mkdir -p /data /app/shares && chmod 750 /data /app/shares
1525

1626
# Create non-root user
1727
RUN adduser --disabled-password --gecos "" fractumuser

0 commit comments

Comments
 (0)