Add sample packaging implementation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
657e6884e8
commit
279b57c4ef
@ -68,3 +68,9 @@ Full usage is as follows:
|
||||
A list of file name to extract from downloaded archive
|
||||
--extract-all, -x Shell commands to execute after download or extraction
|
||||
--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.
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""
|
||||
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 shutil import copytree
|
||||
|
8
sample_pseudo_bin/.pre-commit-hooks.yaml
Normal file
8
sample_pseudo_bin/.pre-commit-hooks.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
- id: stylua
|
||||
name: StyLua
|
||||
description: An opinionated Lua code formatter
|
||||
entry: stylua
|
||||
language: python
|
||||
types:
|
||||
- lua
|
17
sample_pseudo_bin/pyproject.toml
Normal file
17
sample_pseudo_bin/pyproject.toml
Normal 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"
|
Loading…
Reference in New Issue
Block a user