Skip to content

Commit

Permalink
👷 Modernize development environment
Browse files Browse the repository at this point in the history
  • Loading branch information
anarion80 committed Mar 7, 2024
1 parent 53b13b3 commit 207c343
Show file tree
Hide file tree
Showing 34 changed files with 595 additions and 445 deletions.
43 changes: 43 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "anarion80/sodex_dla_ciebie",
"image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm",
"postCreateCommand": "scripts/setup",
"forwardPorts": [
8123
],
"portsAttributes": {
"8123": {
"label": "Home Assistant",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters",
"ms-python.vscode-pylance",
"ms-python.pylint"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"python.pythonPath": "/usr/bin/python3",
"python.analysis.autoSearchPaths": false,
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
},
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
}
}
60 changes: 0 additions & 60 deletions .devcontainer/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions .devcontainer/configuration.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .devcontainer/devcontainer.json

This file was deleted.

5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* text=auto eol=lf
* text=auto eol=lf
# Declare files that will always have LF line endings on checkout.
*.yml text eol=lf
*.yaml text eol=lf
24 changes: 0 additions & 24 deletions .github/workflows/cron.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/pull.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/push.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
change-template: '- #$NUMBER $TITLE @$AUTHOR'
sort-direction: ascending
exclude-contributors:
- 'github-actions[bot]'
- 'github-actions'
- 'renovate[bot]'
- 'renovate'
exclude-labels:
- 'skip-changelog'
- 'dependencies'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
$CONTRIBUTORS
autolabeler:
- label: 'bug'
branch:
- '/fix\/.+/'
- label: 'enhancement'
branch:
- '/feature\/.+/'
- '/feat\/.+/'
28 changes: 28 additions & 0 deletions .github/workflows/scripts/update_hacs_manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""Update the manifest file."""
import json
import os
import sys


def update_manifest():
"""Update the manifest file."""
version = "0.0.0"
for index, value in enumerate(sys.argv):
if value in ["--version", "-V"]:
version = sys.argv[index + 1]

with open(
f"{os.getcwd()}/custom_components/sodexo_dla_ciebie/manifest.json",
) as manifestfile:
manifest = json.load(manifestfile)

manifest["version"] = version

with open(
f"{os.getcwd()}/custom_components/sodexo_dla_ciebie/manifest.json",
"w",
) as manifestfile:
manifestfile.write(json.dumps(manifest, indent=4, sort_keys=True))


update_manifest()
Loading

0 comments on commit 207c343

Please sign in to comment.