Skip to content

Commit

Permalink
refactor: Incorporate 3.0.2 version of The Common Project Template(CI…
Browse files Browse the repository at this point in the history
… update)

Signed-off-by: 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
  • Loading branch information
brlin-tw committed Aug 25, 2024
1 parent 97e9061 commit cbaa358
Show file tree
Hide file tree
Showing 22 changed files with 71 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file is based on The Common EditorConfig Template project
# https://github.com/the-common/editorconfig-template
#
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2021 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: WTFPL

# This is the top-most EditorConfig file
Expand Down
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# * Git - gitattributes Documentation
# https://www.git-scm.com/docs/gitattributes
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

# Avoid exporting development files to release archive
/.* export-ignore
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check-potential-problems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# * Workflow syntax for GitHub Actions - GitHub Docs
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
# Copyright 2022 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
name: Check potential problems in the project
on:
Expand All @@ -25,21 +25,21 @@ jobs:
uses: actions/checkout@v4

- name: Configure PyPI data cache to speed up continuous integration
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-pip
path: ${{ env.PIP_CACHE_DIR }}

- name: >-
Configure pre-commit data cache to speed up continuous integration
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
path: ${{ env.PRE_COMMIT_HOME }}
- name: >-
Configure pre-built ShellCheck cache to speed up continuous integration
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-${{ runner.arch }}-shellcheck
path: ${{ env.SHELLCHECK_DIR }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# * Workflow syntax for GitHub Actions - GitHub Docs
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
name: Release product and their build aritfacts
on:
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
run: ./continuous-integration/generate-release-description.sh

- name: Publish the release archive to the GitHub Releases
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2
with:
name: ${{ env.project_id }} ${{ env.release_version }}
files: |
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# This file is based on The Common .gitignore Templates
# https://github.com/the-common/gitignore-templates
#
# Copyright 2022 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2022 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

# Don't track regular Unix hidden files
.*
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# * `.gitlab-ci.yml` keyword reference | GitLab
# https://docs.gitlab.com/ee/ci/yaml/
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
do-static-analysis:
stage: test
rules:
Expand Down
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Git submodule definition file
#
# Reference:
#
# * Git - gitmodules Documentation
# https://git-scm.com/docs/gitmodules
#
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# This file is based on The Common Pre-commit Framework Configuration Template
# https://github.com/Lin-Buo-Ren/common-precommit-config-template
#
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2021 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

repos:
# Some out-of-the-box hooks for pre-commit
Expand Down Expand Up @@ -42,7 +42,7 @@ repos:
# Check REUSE compliance
# https://reuse.software/
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.2
rev: v4.0.3
hooks:
- id: reuse

Expand Down
10 changes: 0 additions & 10 deletions .reuse/dep5

This file was deleted.

4 changes: 2 additions & 2 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# This file is based on The Unofficial yamllint Configuration Templates
# https://github.com/Lin-Buo-Ren/yamllint-configuration-templates
#
# Copyright 2021 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2021 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
rules:
# Use this rule to control the number of spaces inside braces (`{` and `}`).
# https://yamllint.readthedocs.io/en/stable/rules.html#module-yamllint.rules.braces
Expand Down
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

This project provides a common base of Markdownlint(Node.js variant)'s configuration file(.markdownlint.yml) that should be easily adaptable for most project's with little modifications.

[![The indication badge of Continuous Integration(CI)'s current status](https://cloud.drone.io/api/badges/the-common/markdownlint-nodejs-config-templates/status.svg "Continuous Integration(CI) status")](https://cloud.drone.io/the-common/markdownlint-nodejs-config-templates) [![GitHub Actions workflow status badge](https://github.com/the-common/markdownlint-nodejs-config-templates/actions/workflows/check-potential-problems.yml/badge.svg "GitHub Actions workflow status")](https://github.com/the-common/markdownlint-nodejs-config-templates/actions/workflows/check-potential-problems.yml) [![pre-commit enabled badge](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white "This project uses pre-commit to check potential problems")](https://pre-commit.com/) [![REUSE Specification compliance badge](https://api.reuse.software/badge/github.com/the-common/markdownlint-nodejs-config-templates "This project complies to the REUSE specification to decrease software licensing costs")](https://api.reuse.software/info/github.com/the-common/markdownlint-nodejs-config-templates)
<https://gitlab.com/the-common/markdownlint-nodejs-config-templates>
[![GitHub Actions workflow status badge](https://github.com/the-common/markdownlint-nodejs-config-templates/actions/workflows/check-potential-problems.yml/badge.svg "GitHub Actions workflow status")](https://github.com/the-common/markdownlint-nodejs-config-templates/actions/workflows/check-potential-problems.yml) [![pre-commit enabled badge](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white "This project uses pre-commit to check potential problems")](https://pre-commit.com/) [![REUSE Specification compliance badge](https://api.reuse.software/badge/gitlab.com/the-common/markdownlint-nodejs-config-templates "This project complies to the REUSE specification to decrease software licensing costs")](https://api.reuse.software/info/gitlab.com/the-common/markdownlint-nodejs-config-templates)

## References

Expand All @@ -11,19 +12,10 @@ This project provides a common base of Markdownlint(Node.js variant)'s configura
* [markdownlint/Rules.md at main · DavidAnson/markdownlint](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md)
Description of the official linting rules

## License
## Licensing

Unless otherwise specified, this product is released with [the Creative Commons Attribution-ShareAlike License, version 4.0](https://creativecommons.org/licenses/by-sa/4.0), or any more recent version of your choice, with an exception of the license only covers the configuration file itself, but not other assets in your project.
Unless otherwise noted(individual file's header/[REUSE.toml](REUSE.toml)), this product is licensed under [the 4.0 International version of the Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/4.0/), or any of its more recent versions of your preference.

For the attribution requirement, please retain the "This file is based on ..." mention and link to this project.
As an exception of the previous clause, this product can be licensed otherwise under [the 2.0 version of the Apache license](https://www.apache.org/licenses/LICENSE-2.0) _if_ it is used to instantiate/refactor a project based on it rather than using it in the making of another template project. This allows relicensing the project assets to your liking in your non-template projects with only a conformance requirement of attributing this product somewhere in your project/product credits/acknowledgment/copyright notice documentation/user interface.

### Identify licenses applicable to a certain product/development asset

If the asset is in plaintext format:

1. Check the `SPDX-License-Identifier` tag in the file's header
1. Check the [.reuse/dep5](.reuse/dep5) file from the source tree/release tree directory

If the asset is not in plaintext format:

Check the [.reuse/dep5](.reuse/dep5) file from the source tree/release tree directory
This work complies to [the REUSE Specification](https://reuse.software/spec/), refer the [REUSE - Make licensing easy for everyone](https://reuse.software/) website for info regarding the licensing of this product.
19 changes: 19 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# REUSE licensing information association file
#
# References:
#
# * REUSE.toml | REUSE Specification – Version 3.2 | REUSE
# https://reuse.software/spec-3.2/#reusetoml
#
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0+

version = 1

[[annotations]]
path = [
"*.README.md",
"**/README.md"
]
SPDX-FileCopyrightText = '2021 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>'
SPDX-License-Identifier = 'CC-BY-SA-4.0+'
2 changes: 1 addition & 1 deletion common.markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# https://github.com/the-common/markdownlint-nodejs-config-templates
#
# Copyright 2024 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects

# Inherit Markdownlint rules
default: True
Expand Down
4 changes: 2 additions & 2 deletions continuous-integration/create-gitlab-release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# Create GitLab project release
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

set \
-o errexit \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# System dependency installation logic for the static analysis program
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
set \
-o errexit \
-o nounset
Expand Down
4 changes: 2 additions & 2 deletions continuous-integration/do-static-analysis.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Check potential problems in the project
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
set \
-o errexit \
-o nounset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Install system dependencies required for generating the project
# build artifacts
#
# Copyright 2023 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

set \
-o errexit \
Expand Down
4 changes: 2 additions & 2 deletions continuous-integration/generate-build-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# Generate the project build artifacts
#
# Copyright 2023 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0
set \
-o errexit \
-o nounset
Expand Down
4 changes: 2 additions & 2 deletions continuous-integration/generate-release-description.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Generate release description text to explain the changes between the
# previous release
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

set \
-o errexit \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# * Including other files from within sudoers | Sudoers Manual | Sudo
# https://www.sudo.ws/docs/man/sudoers.man/#Including_other_files_from_within_sudoers
#
# Copyright 2023 林博仁(Buo-ren, Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

# Configure the interpreter behavior to bail out during problematic
# situations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# * Default environment - variablesVariables - GitHub Docs
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

# Whether we are in an CI environment
Defaults env_keep += "CI"
Expand Down
4 changes: 2 additions & 2 deletions continuous-integration/upload-gitlab-generic-packages.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env sh
# Upload release packages as GitLab generic packages
#
# Copyright 2023 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0 OR LicenseRef-Apache-2.0-If-Not-Used-In-Template-Projects
# Copyright 2024 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
# SPDX-License-Identifier: CC-BY-SA-4.0

set \
-o errexit \
Expand Down

0 comments on commit cbaa358

Please sign in to comment.