Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb549bfecc | ||
|
|
8c18821264 | ||
|
|
e3333eb7d4 | ||
|
|
44ee25d97d | ||
|
|
32fa6a819e | ||
|
|
a06b54ee7e | ||
|
|
7e9551e151 | ||
|
|
fa546d4134 | ||
|
|
01cc6a4548 | ||
|
|
cc03cf420d | ||
|
|
88eac33602 | ||
|
|
6a5da649da | ||
|
|
ca07b0669a |
@@ -7,3 +7,6 @@ end_of_line = lf
|
|||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.sh]
|
||||||
|
switch_case_indent = true
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
name: Quality
|
||||||
|
|
||||||
|
# Calls the shared quality-check workflow of TirSystem/github-action
|
||||||
|
# (contract: ADR-0005 there). It runs shellcheck and shfmt on the tracked
|
||||||
|
# shell files and changes no file. Configuration comes from .shellcheckrc
|
||||||
|
# and .editorconfig in this repository. The release workflow requires this run
|
||||||
|
# to be green on the commit it releases.
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
quality:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
# Pinned to an exact tag, never to main; tools-ref pins the script to the
|
||||||
|
# same tag, so the whole check is fixed.
|
||||||
|
uses: TirSystem/github-action/.gitea/workflows/quality-checks.yml@v1.1.0
|
||||||
|
with:
|
||||||
|
languages: shell
|
||||||
|
tools-ref: v1.1.0
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
# Releases this repository: creates the version tag and the release page from
|
||||||
|
# the CHANGELOG.md entry, and only when the commit is the tip of main, its
|
||||||
|
# Quality run is green and the changelog has an entry for the version. The
|
||||||
|
# script is a file of TirSystem/github-action (tools/release.py), fetched at an
|
||||||
|
# exact tag. dry_run defaults to true: it checks and prints and writes nothing,
|
||||||
|
# so a release is a deliberate second run with dry_run false.
|
||||||
|
#
|
||||||
|
# release.py also keeps a moving major tag (v0 for 0.x versions) pointing to
|
||||||
|
# the highest release of its major version, as in TirSystem/github-action.
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "Version to release, MAJOR.MINOR.PATCH without a leading v"
|
||||||
|
required: true
|
||||||
|
dry_run:
|
||||||
|
description: "true checks only; false creates the tag and the release page"
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: release
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
|
steps:
|
||||||
|
- name: Check out the repository
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
|
- name: Fetch the shared script
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
with:
|
||||||
|
repository: TirSystem/github-action
|
||||||
|
ref: v1.1.0
|
||||||
|
path: shared-scripts
|
||||||
|
|
||||||
|
- name: Check and publish the release
|
||||||
|
env:
|
||||||
|
GITEA_API_URL: ${{ gitea.api_url }}
|
||||||
|
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
||||||
|
RELEASE_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA_RELEASE || github.token }}
|
||||||
|
RELEASE_VERSION: ${{ inputs.version }}
|
||||||
|
RELEASE_DRY_RUN: ${{ inputs.dry_run }}
|
||||||
|
RELEASE_SHA: ${{ gitea.sha }}
|
||||||
|
# The status context of the Quality run on the commit. Check the exact
|
||||||
|
# text on a pull request and correct it here if the dry run says the
|
||||||
|
# run was not found.
|
||||||
|
VALIDATION_CONTEXT: "Quality / quality (push)"
|
||||||
|
run: python3 shared-scripts/tools/release.py
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to RepoFoundry. Versions are tags `vMAJOR.MINOR.PATCH`.
|
||||||
|
The release workflow takes the text of a release page from the entry of its
|
||||||
|
version, so every release needs an entry here before it is started.
|
||||||
|
|
||||||
|
Each release lists its changes in these groups, in this order: **Breaking**,
|
||||||
|
**Added**, **Changed**, **Fixed**. A release with a Breaking entry has a new
|
||||||
|
major version.
|
||||||
|
|
||||||
|
`python tools/changelog.py check` of `TirSystem/github-action` verifies this
|
||||||
|
file.
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Gitea workflows: Quality (shellcheck and shfmt through the shared reusable
|
||||||
|
workflow) and Release (tag and release page from this changelog).
|
||||||
|
- A `wiki/` folder with a `.publish` marker, published to the Gitea wiki by the
|
||||||
|
shared Publish wiki workflow.
|
||||||
|
- `switch_case_indent` for `*.sh` in `.editorconfig`, so `shfmt` accepts the
|
||||||
|
existing layout of `case` branches.
|
||||||
@@ -52,8 +52,8 @@ Requirements:
|
|||||||
| `jq` (optional) | JSON parsing; without it a small built-in reader is used |
|
| `jq` (optional) | JSON parsing; without it a small built-in reader is used |
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.tirsystem.com/TirSystem-BashScript/RepoFoundry.git
|
git clone https://git.tirsystem.com/TirSystem-BashScript/repo-foundry.git
|
||||||
cd RepoFoundry
|
cd repo-foundry
|
||||||
src/create-project.sh --help
|
src/create-project.sh --help
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ command (below):
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/work # the folder that will hold my-app
|
cd ~/work # the folder that will hold my-app
|
||||||
~/src/RepoFoundry/src/create-project.sh # creates ~/work/my-app
|
~/src/repo-foundry/src/create-project.sh # creates ~/work/my-app
|
||||||
```
|
```
|
||||||
|
|
||||||
### Make it a global command
|
### Make it a global command
|
||||||
@@ -104,7 +104,7 @@ run `export MSYS=winsymlinks:nativestrict` before the `ln -s`, or use an alias
|
|||||||
in `~/.bashrc`, which works because the script finds its own folder:
|
in `~/.bashrc`, which works because the script finds its own folder:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
alias repo-foundry='bash /c/Users/me/RepoFoundry/src/create-project.sh'
|
alias repo-foundry='bash /c/Users/me/repo-foundry/src/create-project.sh'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<!-- translation of GettingStarted.md, source sha256 b030cafee29e -->
|
||||||
|
|
||||||
|
> Dette er en oversættelse af [`GettingStarted`](GettingStarted). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
|
[English](GettingStarted) | Dansk | [Bahasa Melayu](GettingStarted.ms)
|
||||||
|
|
||||||
|
# Kom godt i gang
|
||||||
|
|
||||||
|
## Krav
|
||||||
|
|
||||||
|
| Værktøj | Bruges til |
|
||||||
|
| --- | --- |
|
||||||
|
| bash 4.4 eller nyere | scriptet (macOS leveres med 3.2: installér først en nyere bash) |
|
||||||
|
| `git` | det lokale projekt og framework-submodulet |
|
||||||
|
| `curl` | GitHub- og Gitea-API'erne |
|
||||||
|
| `ssh` (valgfri) | SSH-kontrollen; uden den springes framework-trinnene over |
|
||||||
|
| `jq` (valgfri) | JSON-læsning; uden den bruges en lille indbygget læser |
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.tirsystem.com/TirSystem-BashScript/repo-foundry.git
|
||||||
|
cd repo-foundry
|
||||||
|
src/create-project.sh --help
|
||||||
|
```
|
||||||
|
|
||||||
|
Intet installeres på hele systemet: scriptet kører fra checkout'et.
|
||||||
|
|
||||||
|
## Konfiguration
|
||||||
|
|
||||||
|
Kopiér `config.env.example` til `config.env` og `.env.example` til `.env`, og angiv derefter tjenesternes adresser og tokens (se [SSH og tokens](SshAndTokens.da)). `.env` indeholder credentials og committes aldrig.
|
||||||
|
|
||||||
|
## Kørsel
|
||||||
|
|
||||||
|
Start scriptet fra den mappe, der skal indeholde det nye projekt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
src/create-project.sh # tør kørsel: læser fra værterne, opretter intet
|
||||||
|
src/create-project.sh --apply # opretter alt efter et sidste ja
|
||||||
|
```
|
||||||
|
|
||||||
|
Der laves ingen commit i det nye projekt. Arbejd på en branch der: frameworkets hooks afviser commits på `main`.
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
English | [Dansk](GettingStarted.da) | [Bahasa Melayu](GettingStarted.ms)
|
||||||
|
|
||||||
|
# Getting started
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
| Tool | Needed for |
|
||||||
|
| --- | --- |
|
||||||
|
| bash 4.4 or later | the script (macOS ships 3.2: install a newer bash first) |
|
||||||
|
| `git` | the local project and the framework submodule |
|
||||||
|
| `curl` | the GitHub and Gitea APIs |
|
||||||
|
| `ssh` (optional) | the SSH check; without it the framework steps are skipped |
|
||||||
|
| `jq` (optional) | JSON parsing; without it a small built-in reader is used |
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.tirsystem.com/TirSystem-BashScript/repo-foundry.git
|
||||||
|
cd repo-foundry
|
||||||
|
src/create-project.sh --help
|
||||||
|
```
|
||||||
|
|
||||||
|
Nothing is installed system-wide: the script runs from the checkout.
|
||||||
|
|
||||||
|
## Configure
|
||||||
|
|
||||||
|
Copy `config.env.example` to `config.env` and `.env.example` to `.env`, then set the service addresses and the tokens (see [SSH and tokens](SshAndTokens)). `.env` holds credentials and is never committed.
|
||||||
|
|
||||||
|
## Run
|
||||||
|
|
||||||
|
Start the script from the folder that should hold the new project:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
src/create-project.sh # dry run: reads from the hosts, creates nothing
|
||||||
|
src/create-project.sh --apply # creates everything after a final yes
|
||||||
|
```
|
||||||
|
|
||||||
|
No commit is made in the new project. Work on a branch there: the framework's hooks refuse commits on `main`.
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<!-- translation of GettingStarted.md, source sha256 b030cafee29e -->
|
||||||
|
|
||||||
|
> Ini ialah terjemahan [`GettingStarted`](GettingStarted). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
|
[English](GettingStarted) | [Dansk](GettingStarted.da) | Bahasa Melayu
|
||||||
|
|
||||||
|
# Bermula
|
||||||
|
|
||||||
|
## Keperluan
|
||||||
|
|
||||||
|
| Alat | Digunakan untuk |
|
||||||
|
| --- | --- |
|
||||||
|
| bash 4.4 atau lebih baharu | skrip (macOS dibekalkan dengan 3.2: pasang bash yang lebih baharu dahulu) |
|
||||||
|
| `git` | projek tempatan dan submodul framework |
|
||||||
|
| `curl` | API GitHub dan Gitea |
|
||||||
|
| `ssh` (pilihan) | semakan SSH; tanpanya langkah framework dilangkau |
|
||||||
|
| `jq` (pilihan) | penghuraian JSON; tanpanya pembaca terbina dalam yang kecil digunakan |
|
||||||
|
|
||||||
|
## Pemasangan
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.tirsystem.com/TirSystem-BashScript/repo-foundry.git
|
||||||
|
cd repo-foundry
|
||||||
|
src/create-project.sh --help
|
||||||
|
```
|
||||||
|
|
||||||
|
Tiada apa-apa dipasang pada seluruh sistem: skrip berjalan dari checkout.
|
||||||
|
|
||||||
|
## Konfigurasi
|
||||||
|
|
||||||
|
Salin `config.env.example` ke `config.env` dan `.env.example` ke `.env`, kemudian tetapkan alamat perkhidmatan dan token (lihat [SSH dan token](SshAndTokens.ms)). `.env` mengandungi kelayakan (credentials) dan tidak pernah di-commit.
|
||||||
|
|
||||||
|
## Larian
|
||||||
|
|
||||||
|
Mulakan skrip dari folder yang akan menyimpan projek baharu:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
src/create-project.sh # larian percubaan: membaca dari hos, tidak mencipta apa-apa
|
||||||
|
src/create-project.sh --apply # mencipta semuanya selepas ya terakhir
|
||||||
|
```
|
||||||
|
|
||||||
|
Tiada commit dibuat dalam projek baharu. Bekerja pada branch di sana: hook framework menolak commit pada `main`.
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<!-- translation of Home.md, source sha256 3ab3ef0f5a55 -->
|
||||||
|
|
||||||
|
> Dette er en oversættelse af [`Home`](Home). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
|
[English](Home) | Dansk | [Bahasa Melayu](Home.ms)
|
||||||
|
|
||||||
|
# Repo Foundry
|
||||||
|
|
||||||
|
Repo Foundry (`src/create-project.sh`) opretter et nyt projekt i én kørsel:
|
||||||
|
|
||||||
|
- et **Gitea**-repository, som er den autoritative kilde;
|
||||||
|
- eventuelt et tomt **GitHub**-repository, der får alt via et push-spejl fra Gitea;
|
||||||
|
- et **lokalt projekt** med én remote uden credentials, `origin`, og SQA-QC-Framework som git-submodul, med dets skills, git-hooks og skabeloner installeret.
|
||||||
|
|
||||||
|
Det er et Bash-script. Det viser først en plan og opretter intet, før du angiver `--apply` og svarer ja.
|
||||||
|
|
||||||
|
## Sider
|
||||||
|
|
||||||
|
| Side | Hvad den dækker |
|
||||||
|
| --- | --- |
|
||||||
|
| [Kom godt i gang](GettingStarted.da) | Krav, installation og første kørsel |
|
||||||
|
| [SSH og tokens](SshAndTokens.da) | SSH-adgang til Gitea og de to adgangstokens |
|
||||||
|
| [Opdatering af frameworket](UpdatingTheFramework.da) | Hold et projekts framework-submodul opdateret |
|
||||||
|
| [Fejlfinding](Troubleshooting.da) | Almindelige fejl og hvad du skal gøre |
|
||||||
|
|
||||||
|
Den fulde reference (konfigurationsfiler, sikkerhedsbeslutninger, fejlhåndtering, kendte begrænsninger) er [README](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md).
|
||||||
|
Meld et problem som en [issue](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/issues).
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
English | [Dansk](Home.da) | [Bahasa Melayu](Home.ms)
|
||||||
|
|
||||||
|
# Repo Foundry
|
||||||
|
|
||||||
|
Repo Foundry (`src/create-project.sh`) sets up a new project in one run:
|
||||||
|
|
||||||
|
- a **Gitea** repository, the source of truth;
|
||||||
|
- optionally an empty **GitHub** repository that receives everything through a push mirror from Gitea;
|
||||||
|
- a **local project** with one credential-free remote, `origin`, and the SQA-QC-Framework as a git submodule, with its skills, git hooks and templates installed.
|
||||||
|
|
||||||
|
It is a Bash script. It shows a plan first and creates nothing until you pass `--apply` and answer yes.
|
||||||
|
|
||||||
|
## Pages
|
||||||
|
|
||||||
|
| Page | What it covers |
|
||||||
|
| --- | --- |
|
||||||
|
| [Getting started](GettingStarted) | Requirements, install and the first run |
|
||||||
|
| [SSH and tokens](SshAndTokens) | SSH access to Gitea and the two access tokens |
|
||||||
|
| [Updating the framework](UpdatingTheFramework) | Keep the framework submodule of a project up to date |
|
||||||
|
| [Troubleshooting](Troubleshooting) | Common failures and what to do |
|
||||||
|
|
||||||
|
The full reference (configuration files, security decisions, error handling, known limitations) is the [README](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md).
|
||||||
|
Report a problem as an [issue](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/issues).
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<!-- translation of Home.md, source sha256 3ab3ef0f5a55 -->
|
||||||
|
|
||||||
|
> Ini ialah terjemahan [`Home`](Home). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
|
[English](Home) | [Dansk](Home.da) | Bahasa Melayu
|
||||||
|
|
||||||
|
# Repo Foundry
|
||||||
|
|
||||||
|
Repo Foundry (`src/create-project.sh`) menyediakan projek baharu dalam satu larian:
|
||||||
|
|
||||||
|
- repositori **Gitea**, iaitu sumber yang sah;
|
||||||
|
- secara pilihan repositori **GitHub** kosong yang menerima semuanya melalui push mirror dari Gitea;
|
||||||
|
- **projek tempatan** dengan satu remote tanpa kelayakan (credentials), `origin`, dan SQA-QC-Framework sebagai submodul git, dengan skill, git hook dan templatnya terpasang.
|
||||||
|
|
||||||
|
Ia ialah skrip Bash. Ia memaparkan pelan dahulu dan tidak mencipta apa-apa sehingga anda memberikan `--apply` dan menjawab ya.
|
||||||
|
|
||||||
|
## Halaman
|
||||||
|
|
||||||
|
| Halaman | Kandungan |
|
||||||
|
| --- | --- |
|
||||||
|
| [Bermula](GettingStarted.ms) | Keperluan, pemasangan dan larian pertama |
|
||||||
|
| [SSH dan token](SshAndTokens.ms) | Akses SSH ke Gitea dan dua token akses |
|
||||||
|
| [Mengemas kini framework](UpdatingTheFramework.ms) | Pastikan submodul framework projek sentiasa terkini |
|
||||||
|
| [Diagnosis](Troubleshooting.ms) | Kegagalan lazim dan tindakan yang perlu diambil |
|
||||||
|
|
||||||
|
Rujukan penuh (fail konfigurasi, keputusan keselamatan, pengendalian ralat, had yang diketahui) ialah [README](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md).
|
||||||
|
Laporkan masalah sebagai [issue](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/issues).
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<!-- translation of SshAndTokens.md, source sha256 52d740c096c8 -->
|
||||||
|
|
||||||
|
> Dette er en oversættelse af [`SshAndTokens`](SshAndTokens). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
|
[English](SshAndTokens) | Dansk | [Bahasa Melayu](SshAndTokens.ms)
|
||||||
|
|
||||||
|
# SSH og tokens
|
||||||
|
|
||||||
|
## SSH-adgang til Gitea
|
||||||
|
|
||||||
|
Framework-submodulet hentes over SSH på port **10022**. Før du kører scriptet:
|
||||||
|
|
||||||
|
1. Tilføj din offentlige SSH-nøgle til din Gitea-konto.
|
||||||
|
2. Opret forbindelse én gang manuelt, så serverens hostnøgle er kendt (scriptet afviser ukendte hostnøgler):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -p 10022 -T git@git.tirsystem.com
|
||||||
|
```
|
||||||
|
|
||||||
|
En besked om, at du er godkendt, uden shell-adgang, betyder, at det virker.
|
||||||
|
|
||||||
|
> **Nøgler med adgangskode.** Scriptet beder aldrig om en adgangskode. En nøgle med adgangskode skal allerede være indlæst i `ssh-agent` (`ssh-add`). Det følges i [issue 77](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/issues/77).
|
||||||
|
|
||||||
|
## Tokens
|
||||||
|
|
||||||
|
| Token | Nøgle i `.env` | Nødvendig | Type |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Gitea-adgangstoken | `GITEA_TOKEN` | altid | adgangstoken med scopes |
|
||||||
|
| GitHub personal access token | `GITHUB_PAT` | kun hvis du vælger GitHub | **klassisk** personal access token |
|
||||||
|
|
||||||
|
Trin for trin med billeder: [sådan opretter du adgangstokens](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/howto/create-access-tokens.md). De præcise tilladelser står under [Token permissions](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#token-permissions) i README.
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
English | [Dansk](SshAndTokens.da) | [Bahasa Melayu](SshAndTokens.ms)
|
||||||
|
|
||||||
|
# SSH and tokens
|
||||||
|
|
||||||
|
## SSH access to Gitea
|
||||||
|
|
||||||
|
The framework submodule is fetched over SSH on port **10022**. Before you run the script:
|
||||||
|
|
||||||
|
1. Add your SSH public key to your Gitea account.
|
||||||
|
2. Connect once by hand so the server's host key is known (the script refuses unknown host keys):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -p 10022 -T git@git.tirsystem.com
|
||||||
|
```
|
||||||
|
|
||||||
|
A message that you have successfully authenticated, without shell access, means it works.
|
||||||
|
|
||||||
|
> **Passphrase keys.** The script never prompts for a passphrase. A key with a passphrase must already be loaded in `ssh-agent` (`ssh-add`). This is tracked in [issue 77](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/issues/77).
|
||||||
|
|
||||||
|
## Tokens
|
||||||
|
|
||||||
|
| Token | Key in `.env` | Needed | Type |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Gitea access token | `GITEA_TOKEN` | always | access token with scopes |
|
||||||
|
| GitHub personal access token | `GITHUB_PAT` | only when you choose GitHub | **classic** personal access token |
|
||||||
|
|
||||||
|
Step by step with pictures: [how to create the access tokens](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/howto/create-access-tokens.md). The exact permissions are under [Token permissions](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#token-permissions) in the README.
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<!-- translation of SshAndTokens.md, source sha256 52d740c096c8 -->
|
||||||
|
|
||||||
|
> Ini ialah terjemahan [`SshAndTokens`](SshAndTokens). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
|
[English](SshAndTokens) | [Dansk](SshAndTokens.da) | Bahasa Melayu
|
||||||
|
|
||||||
|
# SSH dan token
|
||||||
|
|
||||||
|
## Akses SSH ke Gitea
|
||||||
|
|
||||||
|
Submodul framework diambil melalui SSH pada port **10022**. Sebelum anda menjalankan skrip:
|
||||||
|
|
||||||
|
1. Tambahkan kunci awam SSH anda ke akaun Gitea anda.
|
||||||
|
2. Sambung sekali secara manual supaya kunci hos pelayan dikenali (skrip menolak kunci hos yang tidak dikenali):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -p 10022 -T git@git.tirsystem.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Mesej bahawa anda telah berjaya disahkan, tanpa akses shell, bermakna ia berfungsi.
|
||||||
|
|
||||||
|
> **Kunci dengan frasa laluan.** Skrip tidak pernah meminta frasa laluan. Kunci dengan frasa laluan mesti sudah dimuatkan dalam `ssh-agent` (`ssh-add`). Perkara ini dijejaki dalam [issue 77](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/issues/77).
|
||||||
|
|
||||||
|
## Token
|
||||||
|
|
||||||
|
| Token | Kunci dalam `.env` | Diperlukan | Jenis |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Token akses Gitea | `GITEA_TOKEN` | sentiasa | token akses dengan skop |
|
||||||
|
| GitHub personal access token | `GITHUB_PAT` | hanya jika anda memilih GitHub | personal access token **klasik** |
|
||||||
|
|
||||||
|
Langkah demi langkah dengan gambar: [cara mencipta token akses](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/howto/create-access-tokens.md). Kebenaran yang tepat terdapat di bawah [Token permissions](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#token-permissions) dalam README.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<!-- translation of Troubleshooting.md, source sha256 da17de6a5d61 -->
|
||||||
|
|
||||||
|
> Dette er en oversættelse af [`Troubleshooting`](Troubleshooting). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
|
[English](Troubleshooting) | Dansk | [Bahasa Melayu](Troubleshooting.ms)
|
||||||
|
|
||||||
|
# Fejlfinding
|
||||||
|
|
||||||
|
| Symptom | Hvad du skal kontrollere |
|
||||||
|
| --- | --- |
|
||||||
|
| Planen siger, at SSH-testen mislykkedes | Din nøgle er i din Gitea-konto, hostnøglen er kendt (`ssh -p 10022 -T git@git.tirsystem.com`), og en nøgle med adgangskode er indlæst med `ssh-add` |
|
||||||
|
| Scriptet stopper ved værktøjskontrollen | bash er 4.4 eller nyere, og `git` og `curl` er installeret |
|
||||||
|
| En vært afviser tokenet | Tokenet er gyldigt og har de scopes, der står under [SSH og tokens](SshAndTokens.da) |
|
||||||
|
| En kørsel stoppede undervejs | Ret årsagen og kør den samme kommando igen med `--apply`: det, der allerede er oprettet, tilbydes genbrugt |
|
||||||
|
|
||||||
|
Mere: [Error handling and recovery](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#error-handling-and-recovery) og [Known limitations](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#known-limitations) i README.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
English | [Dansk](Troubleshooting.da) | [Bahasa Melayu](Troubleshooting.ms)
|
||||||
|
|
||||||
|
# Troubleshooting
|
||||||
|
|
||||||
|
| Symptom | What to check |
|
||||||
|
| --- | --- |
|
||||||
|
| The plan says the SSH test failed | Your key is in your Gitea account, the host key is known (`ssh -p 10022 -T git@git.tirsystem.com`), and a passphrase key is loaded with `ssh-add` |
|
||||||
|
| The script stops at the tool check | bash is 4.4 or later, and `git` and `curl` are installed |
|
||||||
|
| A host rejects the token | The token is current and has the scopes in [SSH and tokens](SshAndTokens) |
|
||||||
|
| A run stopped half way | Fix the cause and run the same command again with `--apply`: what was already created is offered for reuse |
|
||||||
|
|
||||||
|
More: [Error handling and recovery](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#error-handling-and-recovery) and [Known limitations](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#known-limitations) in the README.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<!-- translation of Troubleshooting.md, source sha256 da17de6a5d61 -->
|
||||||
|
|
||||||
|
> Ini ialah terjemahan [`Troubleshooting`](Troubleshooting). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
|
[English](Troubleshooting) | [Dansk](Troubleshooting.da) | Bahasa Melayu
|
||||||
|
|
||||||
|
# Diagnosis
|
||||||
|
|
||||||
|
| Gejala | Perkara yang perlu disemak |
|
||||||
|
| --- | --- |
|
||||||
|
| Pelan menyatakan ujian SSH gagal | Kunci anda ada dalam akaun Gitea anda, kunci hos dikenali (`ssh -p 10022 -T git@git.tirsystem.com`), dan kunci dengan frasa laluan dimuatkan dengan `ssh-add` |
|
||||||
|
| Skrip berhenti pada semakan alat | bash ialah 4.4 atau lebih baharu, dan `git` serta `curl` dipasang |
|
||||||
|
| Hos menolak token | Token masih sah dan mempunyai skop yang disenaraikan dalam [SSH dan token](SshAndTokens.ms) |
|
||||||
|
| Larian berhenti separuh jalan | Betulkan puncanya dan jalankan arahan yang sama sekali lagi dengan `--apply`: apa yang telah dicipta ditawarkan untuk digunakan semula |
|
||||||
|
|
||||||
|
Lagi: [Error handling and recovery](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#error-handling-and-recovery) dan [Known limitations](https://git.tirsystem.com/TirSystem-BashScript/repo-foundry/src/branch/main/README.md#known-limitations) dalam README.
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<!-- translation of UpdatingTheFramework.md, source sha256 3e450f6c8f34 -->
|
||||||
|
|
||||||
|
> Dette er en oversættelse af [`UpdatingTheFramework`](UpdatingTheFramework). Den engelske side er autoritativ, og ændringer her bliver overskrevet, næste gang wikien publiceres.
|
||||||
|
|
||||||
|
[English](UpdatingTheFramework) | Dansk | [Bahasa Melayu](UpdatingTheFramework.ms)
|
||||||
|
|
||||||
|
# Opdatering af frameworket
|
||||||
|
|
||||||
|
Et projekt oprettet af Repo Foundry har SQA-QC-Framework som git-submodulet `framework`. En clone eller en `git pull` flytter det ikke: projektet bliver på den framework-commit, det har registreret. For at holde frameworket opdateret kører du dette i projektet, fra dets rod:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule update --init --remote --recursive framework
|
||||||
|
```
|
||||||
|
|
||||||
|
| Del | Hvorfor |
|
||||||
|
| --- | --- |
|
||||||
|
| `--init` | henter submodulet, hvis det ikke findes endnu |
|
||||||
|
| `--remote` | flytter `framework` til den nyeste commit i framework-repositoryet i stedet for den commit, projektet har registreret |
|
||||||
|
| `--recursive` | opdaterer også det submodul, frameworket selv har (`framework/qc`, checklisterne) |
|
||||||
|
|
||||||
|
## Efter opdateringen
|
||||||
|
|
||||||
|
1. Installér skills igen, så kopierne i `.claude/skills/` og `.agents/skills/` svarer til det nye framework:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash framework/scripts/install-skills.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Gennemgå, hvad der er ændret, og commit derefter den nye framework-commit på en branch (frameworkets hooks afviser commits på `main`):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git status
|
||||||
|
git switch -c update-framework
|
||||||
|
git add framework
|
||||||
|
git commit -m "Update the framework"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Opdatér `AGENTS.md` (næste afsnit).
|
||||||
|
|
||||||
|
## Opdatér AGENTS.md til den nyeste skabelon
|
||||||
|
|
||||||
|
`AGENTS.md` i dit projekt blev kopieret fra `framework/templates/AGENTS-template.md`, da projektet blev oprettet. Det er en kopi, så den ændres ikke, når frameworket ændres. Skabelonen indeholder de regler, frameworkets skills og hooks forventer (for eksempel superviseret og autonom tilstand), så opdatér den efter hver framework-opdatering.
|
||||||
|
|
||||||
|
1. Se, hvad der er forskelligt:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
diff -u AGENTS.md framework/templates/AGENTS-template.md
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Hvis du aldrig har redigeret `AGENTS.md`, erstat den:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp framework/templates/AGENTS-template.md AGENTS.md
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Hvis du har tilføjet egne regler, kopiér de nye eller ændrede skabelonafsnit ind i `AGENTS.md` i hånden og behold dine egne. Hvis du erstatter filen, mister du dem.
|
||||||
|
|
||||||
|
Repo Foundry lægger `/AGENTS.md` i `.git/info/exclude` i det nye projekt, så git ikke viser filen, og ændringen er ikke en commit: den påvirker kun din arbejdskopi. Erstat ikke `docs/artifact-registry.md` på samme måde: den indeholder dit projekts egne rækker, så sammenlign den kun med `framework/templates/artifact-registry-template.md` og kopiér det, du har brug for.
|
||||||
|
|
||||||
|
## Noter
|
||||||
|
|
||||||
|
- `--remote` følger framework-repositoryets standardbranch, ikke et release-tag. For at blive på et release skal du i stedet checke tagget ud i submodulet: `git -C framework checkout <tag>`, og derefter committe `framework` som ovenfor.
|
||||||
|
- En anden person, der clone'r projektet eller henter din commit, får den registrerede framework-commit med `git submodule update --init --recursive`.
|
||||||
|
- Submodulet hentes over SSH på port 10022, så [SSH-opsætningen](SshAndTokens.da) gælder også for opdateringer.
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
English | [Dansk](UpdatingTheFramework.da) | [Bahasa Melayu](UpdatingTheFramework.ms)
|
||||||
|
|
||||||
|
# Updating the framework
|
||||||
|
|
||||||
|
A project created by Repo Foundry holds the SQA-QC-Framework as the git submodule `framework`. A clone or a `git pull` does not move it: the project stays on the framework commit it recorded. To keep the framework up to date, run this in the project, from its root:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule update --init --remote --recursive framework
|
||||||
|
```
|
||||||
|
|
||||||
|
| Part | Why |
|
||||||
|
| --- | --- |
|
||||||
|
| `--init` | fetches the submodule if it is not there yet |
|
||||||
|
| `--remote` | moves `framework` to the latest commit of the framework repository, instead of the commit the project recorded |
|
||||||
|
| `--recursive` | also updates the submodule the framework holds itself (`framework/qc`, the checklists) |
|
||||||
|
|
||||||
|
## After the update
|
||||||
|
|
||||||
|
1. Re-install the skills, so the copies in `.claude/skills/` and `.agents/skills/` match the new framework:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash framework/scripts/install-skills.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Review what changed, then commit the new framework commit on a branch (the framework's hooks refuse commits on `main`):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git status
|
||||||
|
git switch -c update-framework
|
||||||
|
git add framework
|
||||||
|
git commit -m "Update the framework"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Bring `AGENTS.md` up to date (next section).
|
||||||
|
|
||||||
|
## Update AGENTS.md to the newest template
|
||||||
|
|
||||||
|
`AGENTS.md` in your project was copied from `framework/templates/AGENTS-template.md` when the project was created. It is a copy, so it does not change when the framework does. The template holds the rules the framework's skills and hooks expect (for example the supervised and autonomous modes), so bring it up to date after each framework update.
|
||||||
|
|
||||||
|
1. See what differs:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
diff -u AGENTS.md framework/templates/AGENTS-template.md
|
||||||
|
```
|
||||||
|
|
||||||
|
2. If you never edited `AGENTS.md`, replace it:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp framework/templates/AGENTS-template.md AGENTS.md
|
||||||
|
```
|
||||||
|
|
||||||
|
3. If you added your own rules, copy the new or changed template sections into `AGENTS.md` by hand and keep yours. Replacing the file would lose them.
|
||||||
|
|
||||||
|
Repo Foundry adds `/AGENTS.md` to `.git/info/exclude` in the new project, so git does not list the file and the change is not a commit: it only affects your working copy. Do not replace `docs/artifact-registry.md` the same way: it holds your project's own rows, so only compare it with `framework/templates/artifact-registry-template.md` and copy what you need.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- `--remote` follows the default branch of the framework repository, not a release tag. To stay on a release, check the tag out inside the submodule instead: `git -C framework checkout <tag>`, then commit `framework` as above.
|
||||||
|
- Another person who clones the project, or pulls your commit, gets the recorded framework commit with `git submodule update --init --recursive`.
|
||||||
|
- The submodule is fetched over SSH on port 10022, so the [SSH setup](SshAndTokens) applies to updates too.
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<!-- translation of UpdatingTheFramework.md, source sha256 3e450f6c8f34 -->
|
||||||
|
|
||||||
|
> Ini ialah terjemahan [`UpdatingTheFramework`](UpdatingTheFramework). Halaman bahasa Inggeris ialah teks yang sah, dan perubahan di sini akan ditimpa pada penerbitan wiki yang seterusnya.
|
||||||
|
|
||||||
|
[English](UpdatingTheFramework) | [Dansk](UpdatingTheFramework.da) | Bahasa Melayu
|
||||||
|
|
||||||
|
# Mengemas kini framework
|
||||||
|
|
||||||
|
Projek yang dicipta oleh Repo Foundry menyimpan SQA-QC-Framework sebagai submodul git `framework`. Clone atau `git pull` tidak menggerakkannya: projek kekal pada commit framework yang direkodkannya. Untuk memastikan framework sentiasa terkini, jalankan ini dalam projek, dari akarnya:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git submodule update --init --remote --recursive framework
|
||||||
|
```
|
||||||
|
|
||||||
|
| Bahagian | Sebab |
|
||||||
|
| --- | --- |
|
||||||
|
| `--init` | mengambil submodul jika ia belum ada |
|
||||||
|
| `--remote` | menggerakkan `framework` ke commit terkini repositori framework, bukannya commit yang direkodkan oleh projek |
|
||||||
|
| `--recursive` | turut mengemas kini submodul yang dimiliki framework sendiri (`framework/qc`, senarai semak) |
|
||||||
|
|
||||||
|
## Selepas kemas kini
|
||||||
|
|
||||||
|
1. Pasang semula skill, supaya salinan dalam `.claude/skills/` dan `.agents/skills/` sepadan dengan framework baharu:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash framework/scripts/install-skills.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Semak apa yang berubah, kemudian commit commit framework baharu pada sebuah branch (hook framework menolak commit pada `main`):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git status
|
||||||
|
git switch -c update-framework
|
||||||
|
git add framework
|
||||||
|
git commit -m "Update the framework"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Kemas kini `AGENTS.md` (bahagian seterusnya).
|
||||||
|
|
||||||
|
## Kemas kini AGENTS.md kepada templat terkini
|
||||||
|
|
||||||
|
`AGENTS.md` dalam projek anda disalin daripada `framework/templates/AGENTS-template.md` semasa projek dicipta. Ia ialah salinan, jadi ia tidak berubah apabila framework berubah. Templat itu mengandungi peraturan yang dijangka oleh skill dan hook framework (contohnya mod diselia dan mod autonomi), jadi kemas kininya selepas setiap kemas kini framework.
|
||||||
|
|
||||||
|
1. Lihat apa yang berbeza:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
diff -u AGENTS.md framework/templates/AGENTS-template.md
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Jika anda tidak pernah mengedit `AGENTS.md`, gantikannya:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp framework/templates/AGENTS-template.md AGENTS.md
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Jika anda menambah peraturan sendiri, salin bahagian templat yang baharu atau berubah ke dalam `AGENTS.md` secara manual dan kekalkan peraturan anda. Menggantikan fail akan menghilangkannya.
|
||||||
|
|
||||||
|
Repo Foundry menambah `/AGENTS.md` ke `.git/info/exclude` dalam projek baharu, jadi git tidak menyenaraikan fail itu dan perubahan itu bukan commit: ia hanya memberi kesan kepada salinan kerja anda. Jangan gantikan `docs/artifact-registry.md` dengan cara yang sama: ia mengandungi baris projek anda sendiri, jadi bandingkannya sahaja dengan `framework/templates/artifact-registry-template.md` dan salin apa yang anda perlukan.
|
||||||
|
|
||||||
|
## Nota
|
||||||
|
|
||||||
|
- `--remote` mengikuti branch lalai repositori framework, bukan tag keluaran. Untuk kekal pada keluaran, checkout tag di dalam submodul: `git -C framework checkout <tag>`, kemudian commit `framework` seperti di atas.
|
||||||
|
- Orang lain yang meng-clone projek, atau menarik commit anda, mendapat commit framework yang direkodkan dengan `git submodule update --init --recursive`.
|
||||||
|
- Submodul diambil melalui SSH pada port 10022, jadi [persediaan SSH](SshAndTokens.ms) juga terpakai untuk kemas kini.
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
**Repo Foundry**
|
||||||
|
|
||||||
|
**English**
|
||||||
|
|
||||||
|
- [Home](Home)
|
||||||
|
- [Getting started](GettingStarted)
|
||||||
|
- [SSH and tokens](SshAndTokens)
|
||||||
|
- [Updating the framework](UpdatingTheFramework)
|
||||||
|
- [Troubleshooting](Troubleshooting)
|
||||||
|
|
||||||
|
**Dansk**
|
||||||
|
|
||||||
|
- [Hjem](Home.da)
|
||||||
|
- [Kom godt i gang](GettingStarted.da)
|
||||||
|
- [SSH og tokens](SshAndTokens.da)
|
||||||
|
- [Opdatering af frameworket](UpdatingTheFramework.da)
|
||||||
|
- [Fejlfinding](Troubleshooting.da)
|
||||||
|
|
||||||
|
**Bahasa Melayu**
|
||||||
|
|
||||||
|
- [Utama](Home.ms)
|
||||||
|
- [Bermula](GettingStarted.ms)
|
||||||
|
- [SSH dan token](SshAndTokens.ms)
|
||||||
|
- [Mengemas kini framework](UpdatingTheFramework.ms)
|
||||||
|
- [Diagnosis](Troubleshooting.ms)
|
||||||
Reference in New Issue
Block a user