"A cli archiving bunch of files (e.g. bash scripts), from a git repository made up of a number of (public/private) sub modules, and optionally tagging it and creating a github release for it with the resulting archive."
Project description
archive-and-release
Description
Imagine you have a number of scripts in a repository.
Perhaps they a load of bash script and other files that build a suite of services on a number of services.
Importantly, they don't represent a buildable application in the usual sense (like a python cli application for example.)
Perhaps there is method and structure to your madness and the repository is built up of a number of submodules (and some are private...).
Things like GitActions can't access other private repositories, unless you add a GitHub Token to them (usually seen as a bad idea).
This cli can help with this.
Locally, you can specify a github token that can see all submodule repositories in a local virtual environment, install this package into it and:
- Locally create an archive (e.g. zip) of a remote repository containing any number of nested submodules.
- Create an archive of a remote repository, tag (and push) the git repository, create a GitHub release from the tag and upload the archive to the release.
In both cases you can choose to 'clean' (i.e. remove files and folders matching a pattern, for example '.git') the repository prior to creating the archive.
Installation
Create a virtual environment (optional)
python3 -m venv .env/archive-and-release (or any directory location you like)
. .env/archive-and-release/bin/activate
Install archive-and-release
pip install archive-and-release
Exit the virtual environment
deactivate
Commands
Full options/help
archive-and-release -h
Command options/help
archive-and-release <cmd> -h
Examples to build an archive
archive-and-release build_frontend
archive-and-release build_backend
archive-and-release build --repo "https://github.com/<repository_owner>/<repository_name>" --branch main --repo_target_dir "<clone_target_dir>" --release_target_dir "<created_release_target_dir>" --release_file_name "<created_release_file_name>" --clean_patterns "<path_to_patterns_file>"
Examples to build, tag and create a github release:
archive-and-release release_frontend --tag_version "<tag_version>" --tag_description "<tag_description>"
archive-and-release release_backend --tag_version "<tag_version>" --tag_description "<tag_description>" --release_version "<release_version>" --release_description "<release_description>"
archive-and-release release --repo "https://github.com/<repository_owner>/<repository_name>" --branch main --repo_target_dir "<clone_target_dir>" --release_target_dir "<created_release_target_dir>" --release_file_name "<created_release_file_name>" --clean_patterns "<path_to_patterns_file>" --tag_version "<tag_version>" --tag_description "<tag_description>"
Configuration
There are a number of environment variables that can be used to control the app, or simply create a .env in the directory where you run archive-and-release from.
See the .env.example for more details.
Frontend and Backend
There are commands that build the 'frontend' and 'backend' (for example build_frontend and release_backend). These are short cuts for the build and release commands and don't do anything special.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file archive_and_release-1.0.2.tar.gz.
File metadata
- Download URL: archive_and_release-1.0.2.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b48244de56234603b40e28f3ad95be9f24b956d1cca7e54113d75b54774eb27
|
|
| MD5 |
7150a2ffd55b6727af77bed978afad0f
|
|
| BLAKE2b-256 |
408da42ea3a2ec367e1f048626cb01f9936e802075db1b255cfe77e4711e26fe
|
Provenance
The following attestation bundles were made for archive_and_release-1.0.2.tar.gz:
Publisher:
build-release.yml on dan-east/archive-and-release
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archive_and_release-1.0.2.tar.gz -
Subject digest:
8b48244de56234603b40e28f3ad95be9f24b956d1cca7e54113d75b54774eb27 - Sigstore transparency entry: 575222800
- Sigstore integration time:
-
Permalink:
dan-east/archive-and-release@63caf4ca9205cae7933d0f01e6486f44a58a5d91 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/dan-east
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-release.yml@63caf4ca9205cae7933d0f01e6486f44a58a5d91 -
Trigger Event:
release
-
Statement type:
File details
Details for the file archive_and_release-1.0.2-py3-none-any.whl.
File metadata
- Download URL: archive_and_release-1.0.2-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7dc6f51da67fd336e41ea1b7954429a126cad69de2aa8081b0b1a2bfa03e3a3
|
|
| MD5 |
7740fc46088da17fde2bc80c260029e2
|
|
| BLAKE2b-256 |
ae44ebb0164ec6b7febcd360605975fad9b59b52d9afee17a69ff367f6abb453
|
Provenance
The following attestation bundles were made for archive_and_release-1.0.2-py3-none-any.whl:
Publisher:
build-release.yml on dan-east/archive-and-release
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
archive_and_release-1.0.2-py3-none-any.whl -
Subject digest:
e7dc6f51da67fd336e41ea1b7954429a126cad69de2aa8081b0b1a2bfa03e3a3 - Sigstore transparency entry: 575222808
- Sigstore integration time:
-
Permalink:
dan-east/archive-and-release@63caf4ca9205cae7933d0f01e6486f44a58a5d91 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/dan-east
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-release.yml@63caf4ca9205cae7933d0f01e6486f44a58a5d91 -
Trigger Event:
release
-
Statement type: