Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sentenz committed Mar 31, 2024
0 parents commit f635e8d
Show file tree
Hide file tree
Showing 27 changed files with 2,251 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
# HACK(AK) The rules below have been manually copied from @commitlint/config-conventional and match
# the v1.0.0 specification:
# https://www.conventionalcommits.org/en/v1.0.0/#specification
#
# Remove them and uncomment the config below when the following issue is fixed:
# https://github.com/conventional-changelog/commitlint/issues/613
#
# extends:
# - '@commitlint/config-conventional'
rules:
body-leading-blank: [1, always]
body-max-line-length: [2, always, 100]
footer-leading-blank: [1, always]
footer-max-line-length: [2, always, 100]
header-max-length: [2, always, 100]
subject-case:
- 2
- never
- [sentence-case, start-case, pascal-case, upper-case]
subject-empty: [2, never]
subject-full-stop: [2, never, "."]
type-case: [2, always, lower-case]
type-empty: [2, never]
type-enum:
- 2
- always
- [feat, fix, perf, refactor, test, ci, build, chore, docs, revert, style]
scope-enum:
- 2
- always
- - scripts
- internal
- githooks
- release
67 changes: 67 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# `/.devcontainer`

Images intended for use with tools and services that support the [Dev Container Specification](https://containers.dev/).

> If the user wants to switch to a different `devcontainer.json` file after selecting one, they can do so by using the `Reopen in Container` command in the Command Palette (`Ctrl+Shift+P` on Windows/Linux or `Cmd+Shift+P` on macOS) and selecting a different `devcontainer.json` file.
- [1. Images](#1-images)
- [2. Properties](#2-properties)

## 1. Images

[Docker Dev Containers Images](https://hub.docker.com/_/microsoft-devcontainers) in tools and services that support the dev container specification. Their contents, and corresponding `devcontainer.json` files are typically tied to releases at [GitHub Dev Containers Images](https://github.com/devcontainers/images).

- `/base`
> A simple Ubuntu container with Git and other common utilities installed.
- `/cpp`
> Develop C++ applications on Linux. Includes Debian C++ build tools.
- `/go`
> A dev container spec-supported image for working with Go. Includes appropriate runtime args, common tools, extensions, and dependencies.
- `/typescript-node`
> Develop Node.js based applications. Includes Node.js, eslint, nvm, and yarn.
## 2. Properties

[Dev Container metadata reference](https://containers.dev/implementors/json_reference/) for `devcontainer.json` file contains any needed metadata and settings required to configurate a development container for a given well-defined tool and runtime stack.

- `name`
> A name for the dev container displayed in the UI.
- `image`
> Development container images for use with [VS Code Remote - Containers](https://hub.docker.com/_/microsoft-vscode-devcontainers) from [dev container images](https://github.com/devcontainers/images) repository on a container registry ([DockerHub](https://hub.docker.com/), [GitHub Container Registry](https://docs.github.com/packages/guides/about-github-container-registry), [Azure Container Registry](https://azure.microsoft.com/services/container-registry/)) that devcontainer.json supporting services / tools should use to create the dev container.
- `runArgs`
> An array of [Docker CLI arguments](https://docs.docker.com/engine/reference/commandline/run/) that should be used when running the container.
- `forwardPorts`
> An array of port `numbers` or `host:port` values.
- `preCreateCommand`
> A command to run locally (i.e. host machine, cloud VM) before anything else. This command is run before `onCreateCommand`. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
>
> NOTE This is a good option for downloading the container image or mounting a volume.
- `onCreateCommand`
> A command to run when creating the container. This command is run after `initializeCommand` and before `updateContentCommand`. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
- `updateContentCommand`
> A command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after `onCreateCommand` and before `postCreateCommand`. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
- `postCreateCommand`
> A command to run after creating the container. This command is run after `updateContentCommand` and before `postStartCommand`. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
- `postStartCommand`
> A command to run after starting the container. This command is run after `postCreateCommand` and before `postAttachCommand`. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
>
> NOTE This is a good option for starting long-running processes, running commands that require user interaction, or running commands that need to access the container's filesystem or resources.
- `postAttachCommand`
> A command to run when attaching to the container. This command is run after `postStartCommand`. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
>
> NOTE This is a good option for starting long-running processes, running commands that require user interaction, or running commands that need to access the container's filesystem or resources.
- `remoteUser`
> Overrides the default user that devcontainer.json supporting services tools / runs as in the container.
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Base",
"image": "mcr.microsoft.com/vscode/devcontainers/base:debian-12",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": "false"
}
},
"customizations": {
"vscode": {
"extensions": []
}
},
"runArgs": [
"--name",
"devcontainer-shell",
"-v",
"devcontainer-shell-data:/app/data"
],
"forwardPorts": [],
"postAttachCommand": "",
"remoteUser": "vscode"
}
31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.sh]
indent_style = space
indent_size = 2
max_line_length = 100
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
never_split = false # like -ns
function_next_line = false # like -fn
keep_padding = false # like -kp
space_redirects = false # like -sr
switch_case_indent = true # like -ci
binary_next_line = false # like -bn

[*.md]
indent_size = 2
indent_style = space
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
indent_style = space
insert_final_newline = true
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Set default behavior to automatically normalize line endings.
* text=auto

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf

# Declare files that will always have CRLF line endings on checkout.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.{ics,[iI][cC][sS]} text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
4 changes: 4 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[core]
hooksPath = githooks
[safe]
directory = *
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Release
on:
push:
branches:
- main
jobs:
release:
name: release
runs-on: ubuntu-latest
container:
image: node:latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make workflow-release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/logs/
24 changes: 24 additions & 0 deletions .gitlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Available rules:
#
# T1: title-max-length
# T2: title-trailing-whitespace
# T3: title-trailing-punctuation (disabled)
# T4: title-hard-tab
# T5: title-must-not-contain-word (disabled)
# T6: title-leading-whitespace
# T7: title-match-regex (disabled)
# B1: body-max-line-length
# B2: body-trailing-whitespace
# B3: body-hard-tab
# B4: body-first-line-empty
# B5: body-min-length (disabled)
# B6: body-is-missing (disabled)
# B7: body-changed-file-mention (disabled)
#
# See https://jorisroovers.com/gitlint/latest/rules/ for a full description.

[general]
ignore=T5,T7,B1,B5,B6,B7

[title-max-length]
line-length=120
38 changes: 38 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/gitlab",
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/changelog",
{
"changelogTitle": "# Changelog"
}
],
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]"
}
],
[
"@semantic-release/exec",
{
"publishCmd": "git tag ${nextRelease.version}"
}
]
]
}
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
external-sources=true
16 changes: 16 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"recommendations": [
"ms-vscode-remote.remote-containers",
"ms-vscode-remote.remote-wsl",
"ms-vscode-remote.vscode-remote-extensionpack",
"sonarsource.sonarlint-vscode",
"vivaxy.vscode-conventional-commits",
"alefragnani.project-manager",
"eamodio.gitlens",
"yzhang.markdown-all-in-one",
"davidanson.vscode-markdownlint",
"bierner.markdown-mermaid",
"timonwong.shellcheck",
"foxundermoon.shell-format"
]
}
43 changes: 43 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"window.title": "${rootName}",
"files.encoding": "utf8",
"files.eol": "\n",
"editor.defaultFormatter": null,
"editor.formatOnSave": true,
"editor.suggest.showFolders": true,
"editor.bracketPairColorization.enabled": true,
"editor.stickyScroll.enabled": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"terminal.integrated.defaultProfile.windows": "Git Bash",
"terminal.integrated.stickyScroll.enabled": true,
"conventionalCommits.gitmoji": false,
"[markdown]": {
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.tabSize": 2,
"editor.defaultFormatter": "vscode.markdown-language-features"
},
"markdown.extension.toc.levels": "2..6",
"[shell]": {
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.tabSize": 2,
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"[json]": {
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.defaultFormatter": "vscode.json-language-features"
},
"[yaml]": {
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.defaultFormatter": null
}
}
Loading

0 comments on commit f635e8d

Please sign in to comment.