Skip to content

Commit

Permalink
refactor: adapt to godot 4
Browse files Browse the repository at this point in the history
  • Loading branch information
florianvazelle committed Aug 1, 2024
1 parent 4b3c7f5 commit ecc1ad0
Show file tree
Hide file tree
Showing 136 changed files with 665 additions and 519 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = assets/**
ignore-words-list = lod,LOD
10 changes: 10 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Variables used by the Justfile

# Godot

GODOT_VERSION=4.2.2

# Addon

ADDON_NAME=godot-recorder
ADDON_VERSION=0.1.0
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
*.gd linguist-language=GDScript
*.hdr binary

# Exclude all top-level files and directories (except addons) from zip downloads.
# This makes installing through the AssetLib easier, because no files and folders
# need to be unchecked.

/** export-ignore
/addons/godot-recorder !export-ignore
/addons/godot-recorder/** !export-ignore
34 changes: 34 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^plug\\.gd$"],
"matchStrings": [
"\\s+plug\\(\\s*\"(?<depName>.*)\",\\s+{\\s*\"commit\":\\s*\"(?<currentDigest>.*)\",\\s*\"renovate-branch\":\\s*\"(?<currentValue>.*)\""
],
"packageNameTemplate": "https://github.com/{{{depName}}}.git",
"versioningTemplate": "git",
"datasourceTemplate": "git-refs"
},
{
"customType": "regex",
"fileMatch": ["^plug\\.gd$"],
"matchStrings": [
"\\s+plug\\(\"(?<depName>.*?)\",\\ \\{\\s*\"tag\":\\ \"(?<currentValue>.*)\""
],
"packageNameTemplate": "https://github.com/{{{depName}}}.git",
"versioningTemplate": "git",
"datasourceTemplate": "git-tags"
},
{
"customType": "regex",
"fileMatch": ["^.env$"],
"matchStrings": ["GODOT_VERSION=(?<currentValue>.*?)\\n"],
"depNameTemplate": "godotengine/godot",
"packageNameTemplate": "https://github.com/godotengine/godot.git",
"versioningTemplate": "loose",
"extractVersionTemplate": "^(?<version>.*)$",
"datasourceTemplate": "git-tags"
}
]
}
15 changes: 15 additions & 0 deletions .github/workflows/changelog_verifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Changelog Verifier

on:
pull_request:
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
verify-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: "autocut, skip-changelog"
19 changes: 19 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Link Checker
on:
push:

jobs:
linkchecker:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: lychee Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
with:
args: --accept=200,403,429 "**/*.html" "**/*.md" "**/*.txt" "**/*.json" --exclude "file:///github/workspace/*" --exclude-path ".github/renovate.json" --exclude-mail
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
34 changes: 34 additions & 0 deletions .github/workflows/lint_pr_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint PR Title

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
scopes: |
addons
assets
scripts
scenes
dependabot
workflows
readme
changelog
deps
requireScope: false
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true
47 changes: 47 additions & 0 deletions .github/workflows/release-packaging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Packaging

on:
push:
workflow_dispatch:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
check:
runs-on: ubuntu-22.04
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2

- name: Load dotenv
run: just ci-load-dotenv

- name: Check
run: just fmt

- name: Ensure version is equal to tag
if: startsWith(github.ref, 'refs/tags/')
run: |
[ "${{ env.game_version }}" == "${{ env.BRANCH_NAME }}" ] || exit 2
publish:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [check]

if: startsWith(github.ref, 'refs/tags/')

steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2

- name: Load dotenv
run: just ci-load-dotenv

- name: Publish
run: just publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Godot-specific ignores
.godot/
.import/
gfxrecon_capture_*

# Imported translations (automatically generated from CSV files)
*.translation

# Mono-specific ignores
.mono/
data_*/

# Python-specific ignores
venv/

# Export output
dist/
build/
override.cfg

# Docs output
reference.json
site/
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions .import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5

This file was deleted.

Binary file not shown.
3 changes: 0 additions & 3 deletions .import/project_icon.png-dde21f4089c4b26238f53597a56a8098.md5

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions .import/sample.png-e83d904df67be35a3470a03c20e2b3c2.md5

This file was deleted.

Binary file not shown.
Binary file not shown.
54 changes: 54 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files # Prevent giant files from being committed
args: ['--maxkb=1500']
- id: fix-byte-order-marker # Prevents weird UTF-8 encoding edge cases
- id: check-case-conflict # Check if case-insensitive filesystems would bork
- id: check-docstring-first # Check for if docstring was misplaced
- id: check-executables-have-shebangs
- id: check-json # Checks for valid json
- id: check-merge-conflict # Checks strings that look like a committed merge conflict
- id: check-xml # Checks for valid xml
- id: check-yaml # Checks for valid yaml
- id: end-of-file-fixer # Checks for ending with a newline
- id: mixed-line-ending # Consistent LF or CRLF
- id: trailing-whitespace # No trailing whitespace
- repo: https://github.com/fsfe/reuse-tool
rev: v2.0.0
hooks:
- id: reuse
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
- repo: https://github.com/Scony/godot-gdscript-toolkit
rev: 4.2.2
hooks:
- id: gdformat
exclude: '^addons/gd-plug/'
- id: gdlint
exclude: '^addons/gd-plug/'
- repo: local
hooks:
- id: check-filenames-are-lowercase
name: check that filenames are lowercase
entry: filenames must be lower-case or lower_case only
language: fail
files: '[^a-z0-9._/-]'
exclude: |
(?x)^(
.godot/|
.reuse/|
addons/gd-plug/|
CHANGELOG.md|
CONTRIBUTING.md|
CREDITS.md|
Justfile|
LICENSE.md|
LICENSES/|
public/|
README.md|
RELEASING.md
)
1 change: 1 addition & 0 deletions .reuse/REUSE-compliant.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: godot-recorder
Upstream-Contact: Florian Vazelle <[email protected]>
Source: https://github.com/MechanicalFlower/godot-recorder

Files: *
Copyright: 2024-present Florian Vazelle
License: MIT
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CHANGELOG
Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
### Dependencies
62 changes: 62 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Contributing

We welcome contributions to our open source Godot
game project! There are many ways you can help,
including reporting bugs, improving documentation,
and contributing code.

## Code of Conduct

We value the participation of every member of our
community and want to ensure that everyone
has an enjoyable and fulfilling experience. As
such, we have adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as
our code of conduct. By participating in this
project, you agree to abide by its terms.

## Contributing Code

To contribute code to the project, follow these steps:

1. Fork the repository to your own GitHub account.
2. Clone the repository to your local machine.
3. Create a new branch for your changes.
4. Make your changes and commit them to your local repository.
5. Push your changes to your forked repository on GitHub.
6. Create a pull request from your forked repository to the original repository.

Please note that all code contributions should
pass the continuous integration (CI) checks
that are set up for the project. These checks
ensure that the code is well-formatted and
that tests are passing.


## Reporting Bugs

If you find a bug in the project, please report
it by creating an issue in the repository's issue
tracker. Be sure to include as much information
as possible, including the steps to reproduce
the bug and any relevant error messages.

## Improving Documentation

If you would like to improve the documentation
for the project, you can do so by submitting a
pull request with your changes. Please follow
the same process as for contributing code, and
make sure that your changes are properly formatted
and well-written.

## Questions and Feedback

If you have any questions or feedback about the
project, don't hesitate to reach out! You can
create an issue in the repository's issue tracker,
or contact us directly through our website or
social media channels.

Thank you for considering contributing to our
open source Godot game project! We appreciate
your help and look forward to working with you.
Loading

0 comments on commit ecc1ad0

Please sign in to comment.