diff --git a/CODE_OF_CONDUCT.md b/docs/code_of_conduct.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to docs/code_of_conduct.md diff --git a/CONTRIBUTING.md b/docs/contributing.md similarity index 95% rename from CONTRIBUTING.md rename to docs/contributing.md index 18dec8b..d1d258c 100644 --- a/CONTRIBUTING.md +++ b/docs/contributing.md @@ -3,7 +3,7 @@ For the most up-to-date guide, please see [matrixfurry.com/common](https://tangl Development happens on [Tangled](https://tangled.org/did:plc:zmjoeu3stwcn44647rhxa44o). # Developer Certificate of Origin -By submitting code contributions as an individual or on behalf of a corporation to any directory in this repository, you agree to the [Developer Certificate of Origin](./DCO.txt) +By submitting code contributions as an individual or on behalf of a corporation to any directory in this repository, you agree to the [Developer Certificate of Origin](./legal/DCO.txt) # Reporting issues Yes, issues are contributions. @@ -33,7 +33,7 @@ Notes: Commit signing is optional but highly recommended. Once you make your first signed commit, all future commits must be signed. -Please see the [security policy](./SECURITY.md) for more information. +Please see the [security policy](./security.md) for more information. ## Submitting changes @@ -62,7 +62,7 @@ Contributions should be largely authored by the people in the commit information If you are unsure, or you had help from automated AI-generation in part of your contribution, please tell us when contributing. It does not mean the contribution will be rejected outright. We will evaluate on a case-by-case basis. We value honesty, and take it into consideration. # Security -Please see the [security policy](./SECURITY.md) +Please see the [security policy](./security.md) # Maintainers diff --git a/DCO.txt b/docs/legal/DCO.txt similarity index 100% rename from DCO.txt rename to docs/legal/DCO.txt diff --git a/SECURITY.md b/docs/security.md similarity index 99% rename from SECURITY.md rename to docs/security.md index dfd039c..6b59ad9 100644 --- a/SECURITY.md +++ b/docs/security.md @@ -1,4 +1,4 @@ -For the most up-to-date security policy, please see [matrixfurry.com/common](https://tangled.org/@matrixfurry.com/common/blob/main/SECURITY.md). +For the most up-to-date security policy, please see [matrixfurry.com/common](https://tangled.org/@matrixfurry.com/common/blob/main/docs/security.md). # Reporting Please report security issues via [SimpleX](https://smp18.simplex.im/a#Wc2x2IBqqwzgmeGkN0XtKrGMLBxFuxmoYgkTGgGgR0M) or [Email](mailto:shiloh@shilohfen.com). diff --git a/meta/scripts/update-common-files.nu b/meta/scripts/update-common-files.nu new file mode 100755 index 0000000..38466c5 --- /dev/null +++ b/meta/scripts/update-common-files.nu @@ -0,0 +1,31 @@ +#!/usr/bin/env nu +# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-FileCopyrightText: 2025 @matrixfurry.com + +use std log + +const common = path self ../../ + +def main [ + --update-license + --commit (-c) +] { + if $commit and (jj status | lines | first) != "The working copy has no changes." { + error make { + msg: "the working copy has changes" + help: "create an empty commit before updating files" + } + } + + cp -r ($common | path join docs) . + log info "updated common project files" + + if $update_license or not ("./LICENSE" | path exists) { + cp -r ($common | path join LICENSE) . + log warning "updated project license" + } + + if $commit { + jj commit -m "docs: update shared documentation" + } +} diff --git a/scripts/update-common-files.nu b/scripts/update-common-files.nu deleted file mode 100755 index 4423a34..0000000 --- a/scripts/update-common-files.nu +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env nu -# SPDX-License-Identifier: AGPL-3.0-only -# SPDX-FileCopyrightText: 2025 @matrixfurry.com - -use std log - -# Update the common files in this directory to the latest from https://tangled.org/@matrixfurry.com/common -def main [] { - let files = [ - "CODE_OF_CONDUCT.md" - "CONTRIBUTING.md" - "DCO.txt" - "SECURITY.md" - ] - - $files - | each {|file| - log info $"Updating file: ($file)" - - http get $"https://tangled.org/@matrixfurry.com/common/raw/main/($file)" - | save -fp $file - } - - null -}