chore: add basic project
This commit is contained in:
46
.gitea/workflows/ci.yml
Normal file
46
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v2.x
|
||||
|
||||
- name: Format
|
||||
id: format
|
||||
continue-on-error: true
|
||||
run: deno task make fmt
|
||||
|
||||
- name: Lint
|
||||
id: lint
|
||||
continue-on-error: true
|
||||
run: deno task make lint
|
||||
|
||||
- name: Test
|
||||
id: test
|
||||
continue-on-error: true
|
||||
run: deno task make test
|
||||
|
||||
- name: Fail if any step failed
|
||||
if: |
|
||||
steps.format.outcome != 'success' ||
|
||||
steps.lint.outcome != 'success' ||
|
||||
steps.test.outcome != 'success'
|
||||
run: |
|
||||
echo "::error::One or more steps failed"
|
||||
exit 1
|
||||
18
.gitea/workflows/release.yml
Normal file
18
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Auto Changelog & (Release)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Release
|
||||
uses: https://git.0xmax42.io/actions/auto-changelog-release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.RELEASE_PUBLISH_TOKEN }}
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.deno-make.json
|
||||
.coverage/**/*
|
||||
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"exportall.config.folderListener": [
|
||||
"/src/btrfs/interfaces",
|
||||
"/src/btrfs/utils"
|
||||
]
|
||||
}
|
||||
123
cliff.toml
Normal file
123
cliff.toml
Normal file
@@ -0,0 +1,123 @@
|
||||
# CLIFF_VERSION=2.10.1
|
||||
# git-cliff ~ default configuration file
|
||||
# https://git-cliff.org/docs/configuration
|
||||
#
|
||||
# Lines starting with "#" are comments.
|
||||
# Configuration options are organized into tables and keys.
|
||||
# See documentation for more information on available options.
|
||||
[remote.gitea]
|
||||
owner = "maxp"
|
||||
repo = "docker-vbtrfs-plugin"
|
||||
|
||||
[changelog]
|
||||
# postprocessors
|
||||
postprocessors = [
|
||||
{ pattern = '<GITEA_URL>', replace = "https://git.0xmax42.io" }, # replace gitea url
|
||||
]
|
||||
|
||||
header = """
|
||||
# Changelog\n
|
||||
All notable changes to this project will be documented in this file.\n
|
||||
"""
|
||||
|
||||
body = """
|
||||
{%- macro remote_url() -%}
|
||||
<GITEA_URL>/{{ remote.gitea.owner }}/{{ remote.gitea.repo }}
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro indent(text, prefix=" ") -%}
|
||||
{%- set lines = text | split(pat="\n") -%}
|
||||
{%- for l in lines -%}
|
||||
{{ prefix ~ l }}{% if not loop.last %}{{ "\n" }}{% endif %}
|
||||
{%- endfor -%}
|
||||
{%- endmacro -%}
|
||||
|
||||
{% if version %}\
|
||||
{% if previous.version %}\
|
||||
## [{{ version | trim_start_matches(pat="v") }}]\
|
||||
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||
{% else %}\
|
||||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||
{% endif %}\
|
||||
{% else %}\
|
||||
## [unreleased]
|
||||
{% endif %}\
|
||||
{% for group, commits in commits | group_by(attribute="group") %}
|
||||
### {{ group | striptags | trim | upper_first }}\n
|
||||
{% for commit in commits %}\
|
||||
{% if commit.merge_commit %}\
|
||||
- 🔀 **{{ commit.message | upper_first }}** - \
|
||||
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
||||
{% if commit.body %}\n{{ self::indent(text=commit.body, prefix=" ") }}{% endif %}\
|
||||
{% if commit.extra and commit.extra.children %}\
|
||||
{% for child in commit.extra.children %}
|
||||
{{ " " | safe }}- {% if child.extra.mismatch_type %}**{{ child.extra.mismatch_type }}**:{% endif %}{% if child.scope %}*({{ child.scope }})* {% endif %}\
|
||||
{% if child.breaking %}[**breaking**] {% endif %}\
|
||||
{{ child.message | upper_first }} - \
|
||||
([{{ child.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ child.id }}))\
|
||||
{% endfor %}\
|
||||
{% endif %}\
|
||||
{% else %}\
|
||||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
||||
{% if commit.breaking %}[**breaking**] {% endif %}\
|
||||
{{ commit.message | upper_first }} - \
|
||||
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
|
||||
{% endif %}
|
||||
{% endfor %}\
|
||||
{% endfor %}\n
|
||||
"""
|
||||
footer = """
|
||||
|
||||
"""
|
||||
|
||||
# remove the leading and trailing s
|
||||
trim = true
|
||||
|
||||
# render body even when there are no releases to process
|
||||
# render_always = true
|
||||
# output file path
|
||||
# output = "test.md"
|
||||
|
||||
[git]
|
||||
# parse the commits based on https://www.conventionalcommits.org
|
||||
conventional_commits = true
|
||||
# filter out the commits that are not conventional
|
||||
filter_unconventional = true
|
||||
# process each line of a commit as an individual commit
|
||||
split_commits = false
|
||||
# regex for preprocessing the commit messages
|
||||
commit_preprocessors = [
|
||||
# Replace issue numbers
|
||||
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
||||
# Check spelling of the commit with https://github.com/crate-ci/typos
|
||||
# If the spelling is incorrect, it will be automatically fixed.
|
||||
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
||||
]
|
||||
# regex for parsing and grouping commits
|
||||
commit_parsers = [
|
||||
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
||||
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
||||
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
||||
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
||||
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
||||
{ message = "^chore\\(changelog\\)", skip = true },
|
||||
{ message = "^chore\\(version\\)", skip = true },
|
||||
{ message = "^chore\\(release\\): prepare for", skip = true },
|
||||
{ message = "^chore\\(deps.*\\)", skip = true },
|
||||
{ message = "^chore\\(pr\\)", skip = true },
|
||||
{ message = "^chore\\(pull\\)", skip = true },
|
||||
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
||||
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
||||
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
||||
{ message = ".*", group = "<!-- 10 -->💼 Other" },
|
||||
]
|
||||
# Regex to select git tags that represent releases.
|
||||
tag_pattern = "v[0-9]+\\.[0-9]+\\.[0-9]+"
|
||||
# filter out the commits that are not matched by commit parsers
|
||||
filter_commits = false
|
||||
# sort the tags topologically
|
||||
topo_order = false
|
||||
# sort the commits inside sections by oldest/newest order
|
||||
sort_commits = "newest"
|
||||
68
deno.jsonc
Normal file
68
deno.jsonc
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"tasks": {
|
||||
"make": "deno run --allow-env --allow-read --allow-write=.deno-make.json --allow-run=deno https://git.0xmax42.io/maxp/deno_make/raw/branch/main/mod.ts $0"
|
||||
},
|
||||
"+tasks": {
|
||||
"start": {
|
||||
"task": "deno run src/mod.ts",
|
||||
"deno": {
|
||||
"run": {
|
||||
"permissions": {
|
||||
"all": true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"task": "deno test **/__tests__/*.test.ts",
|
||||
"deno": {
|
||||
"test": {
|
||||
"permissions": {
|
||||
"all": true
|
||||
},
|
||||
"coverage": "./.coverage"
|
||||
}
|
||||
}
|
||||
},
|
||||
"fmt": {
|
||||
"task": "deno fmt",
|
||||
"deno": {
|
||||
"fmt": {
|
||||
"check": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"task": "deno lint",
|
||||
"deno": {
|
||||
"lint": { }
|
||||
}
|
||||
},
|
||||
"ci": {
|
||||
"task": "deno task make fmt && deno task make lint && deno task make test",
|
||||
"description": "For local CI checks"
|
||||
}
|
||||
},
|
||||
"compilerOptions": { },
|
||||
"fmt": {
|
||||
"useTabs": false,
|
||||
"lineWidth": 80,
|
||||
"indentWidth": 4,
|
||||
"semiColons": true,
|
||||
"singleQuote": true,
|
||||
"proseWrap": "preserve",
|
||||
"include": [
|
||||
"src/",
|
||||
"mod.ts"
|
||||
]
|
||||
},
|
||||
"exclude": [ ],
|
||||
"imports": {
|
||||
"@logtape/logtape": "jsr:@logtape/logtape@^1.1.1",
|
||||
"@logtape/pretty": "jsr:@logtape/pretty@^1.1.1",
|
||||
"@std/assert": "jsr:@std/assert@1.0.15",
|
||||
"@std/testing": "jsr:@std/testing@1.0.16",
|
||||
"@std/path": "jsr:@std/path@1.1.2",
|
||||
"HttpKernel/": "https://git.0xmax42.io/maxp/HttpKernel/raw/tag/v0.2.0/src/"
|
||||
}
|
||||
}
|
||||
68
deno.lock
generated
Normal file
68
deno.lock
generated
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"version": "5",
|
||||
"specifiers": {
|
||||
"jsr:@logtape/logtape@^1.1.1": "1.1.1",
|
||||
"jsr:@logtape/pretty@^1.1.1": "1.1.1",
|
||||
"jsr:@std/assert@1.0.15": "1.0.15",
|
||||
"jsr:@std/assert@^1.0.15": "1.0.15",
|
||||
"jsr:@std/internal@^1.0.10": "1.0.12",
|
||||
"jsr:@std/internal@^1.0.12": "1.0.12",
|
||||
"jsr:@std/path@1.1.2": "1.1.2",
|
||||
"jsr:@std/testing@1.0.16": "1.0.16",
|
||||
"npm:@types/node@24.0.7": "24.0.7"
|
||||
},
|
||||
"jsr": {
|
||||
"@logtape/logtape@1.1.1": {
|
||||
"integrity": "65ebc4ae58238f7404d96b52112293279b1d256c578621a750e793c36e34c3d2"
|
||||
},
|
||||
"@logtape/pretty@1.1.1": {
|
||||
"integrity": "250029d3d86e7d4a1824b40c21f3f8712823596ca23bf82b6c800db25c7b2e88",
|
||||
"dependencies": [
|
||||
"jsr:@logtape/logtape",
|
||||
"npm:@types/node"
|
||||
]
|
||||
},
|
||||
"@std/assert@1.0.15": {
|
||||
"integrity": "d64018e951dbdfab9777335ecdb000c0b4e3df036984083be219ce5941e4703b",
|
||||
"dependencies": [
|
||||
"jsr:@std/internal@^1.0.12"
|
||||
]
|
||||
},
|
||||
"@std/internal@1.0.12": {
|
||||
"integrity": "972a634fd5bc34b242024402972cd5143eac68d8dffaca5eaa4dba30ce17b027"
|
||||
},
|
||||
"@std/path@1.1.2": {
|
||||
"integrity": "c0b13b97dfe06546d5e16bf3966b1cadf92e1cc83e56ba5476ad8b498d9e3038",
|
||||
"dependencies": [
|
||||
"jsr:@std/internal@^1.0.10"
|
||||
]
|
||||
},
|
||||
"@std/testing@1.0.16": {
|
||||
"integrity": "a917ffdeb5924c9be436dc78bc32e511760e14d3a96e49c607fc5ecca86d0092",
|
||||
"dependencies": [
|
||||
"jsr:@std/assert@^1.0.15",
|
||||
"jsr:@std/internal@^1.0.12"
|
||||
]
|
||||
}
|
||||
},
|
||||
"npm": {
|
||||
"@types/node@24.0.7": {
|
||||
"integrity": "sha512-YIEUUr4yf8q8oQoXPpSlnvKNVKDQlPMWrmOcgzoduo7kvA2UF0/BwJ/eMKFTiTtkNL17I0M6Xe2tvwFU7be6iw==",
|
||||
"dependencies": [
|
||||
"undici-types"
|
||||
]
|
||||
},
|
||||
"undici-types@7.8.0": {
|
||||
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="
|
||||
}
|
||||
},
|
||||
"workspace": {
|
||||
"dependencies": [
|
||||
"jsr:@logtape/logtape@^1.1.1",
|
||||
"jsr:@logtape/pretty@^1.1.1",
|
||||
"jsr:@std/assert@1.0.15",
|
||||
"jsr:@std/path@1.1.2",
|
||||
"jsr:@std/testing@1.0.16"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user