Add sample packaging implementation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
IamTheFij 2022-01-06 15:10:17 -08:00
parent 657e6884e8
commit 279b57c4ef
4 changed files with 32 additions and 1 deletions

View File

@ -68,3 +68,9 @@ Full usage is as follows:
A list of file name to extract from downloaded archive A list of file name to extract from downloaded archive
--extract-all, -x Shell commands to execute after download or extraction --extract-all, -x Shell commands to execute after download or extraction
--url-only Only print the URL and do not download --url-only Only print the URL and do not download
### Pre-Commit usage
This can be used a way to wrap a binary release from a Github or Gitea by adding a `pyproject.toml` file to your current project directory and adding a `.pre-commit-hooks.yaml` file.
Take a look at the `./sample_pseudo_bin` directory to see an example.

View File

@ -1,6 +1,6 @@
""" """
This builder functions as a pseudo builder that instead downloads and installs a binary file using This builder functions as a pseudo builder that instead downloads and installs a binary file using
release-gitter based on a pyproject.toml file release-gitter based on a pyproject.toml file. It's a total hack...
""" """
from pathlib import Path from pathlib import Path
from shutil import copytree from shutil import copytree

View File

@ -0,0 +1,8 @@
---
- id: stylua
name: StyLua
description: An opinionated Lua code formatter
entry: stylua
language: python
types:
- lua

View File

@ -0,0 +1,17 @@
[build-system]
requires = ["release-gitter[builder]"]
build-backend = "pseudo_builder"
[tool.release-gitter]
# git-url is not needed if you're in the actual source repo
git-url = "https://github.com/JohnnyMorganz/StyLua"
# version is not needed if you have a Cargo.toml in the current directory
version = "0.11.3"
extract-files = [ "stylua" ]
format = "stylua-{version}-{system}.zip"
exec = "chmod +x stylua"
[tool.release-gitter.map-system]
Darwin = "macos"
Windows = "win64"
Linux = "linux"