mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Set Pyinstaller, Pip environment to create reproducible builds of Khoj
- Dependency Version Pinning - First level dependency versions have been pinned. - Transitive dependencies have not been specified yet - Testing - The Pyinstaller build has been only minimally tested for reproducibility - The Khoj package generated for PyPi have not been tested for reproducibility - References - https://reproducible-builds.org/docs/source-date-epoch/ - https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build
This commit is contained in:
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@@ -45,6 +45,10 @@ jobs:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
|
||||
run: |
|
||||
# Setup Environment for Reproducible Builds
|
||||
export PYTHONHASHSEED=42
|
||||
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct
|
||||
|
||||
rm -rf dist
|
||||
python -m build
|
||||
twine check dist/*
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -47,6 +47,10 @@ jobs:
|
||||
- name: Package Khoj App
|
||||
shell: bash
|
||||
run: |
|
||||
# Setup Environment for Reproducible Builds
|
||||
export PYTHONHASHSEED=42
|
||||
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct
|
||||
|
||||
pyinstaller Khoj.spec
|
||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||
mv dist/Khoj.exe dist/khoj_"$GITHUB_REF_NAME"_amd64.exe
|
||||
|
||||
Reference in New Issue
Block a user