Sfoglia il codice sorgente

chore: Update to latest template

Sean Blackburn 1 anno fa
parent
commit
7649ee6094
6 ha cambiato i file con 41 aggiunte e 6 eliminazioni
  1. 1 1
      .copier-answers.yml
  2. 19 0
      .markdownlint-cli2.yaml
  3. 6 0
      .pre-commit-config.yaml
  4. 4 3
      .releaserc.yaml
  5. 1 0
      cspell.config.yaml
  6. 10 2
      makefile

+ 1 - 1
.copier-answers.yml

@@ -1,5 +1,5 @@
 # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
-_commit: 1.2.0
+_commit: 1.3.1
 _src_path: ssh://git@git.snas.black-burn.ch:43057/templates/copier-openapi.git
 author: Sean Blackburn
 ci: woodpecker

+ 19 - 0
.markdownlint-cli2.yaml

@@ -0,0 +1,19 @@
+config:
+  MD012: # no-multiple-blanks
+    maximum: 2
+
+  MD013: # line-length
+    code_blocks: false
+    tables: false
+
+  MD022: # blanks-around-headings
+    lines_above: 2
+    lines_below: 1
+
+  MD024: # no-duplicate-heading
+    siblings_only: true
+
+ignores:
+  - "CHANGELOG.md"
+
+fix: true

+ 6 - 0
.pre-commit-config.yaml

@@ -40,6 +40,12 @@ repos:
           - "--locale"
           - "en-GB,de-CH"
 
+  - repo: https://github.com/DavidAnson/markdownlint-cli2
+    rev: v0.14.0
+    hooks:
+      - id: markdownlint-cli2
+        args: ["--fix"]
+
 
   - repo: local
     hooks:

+ 4 - 3
.releaserc.yaml

@@ -8,9 +8,10 @@ plugins:
 
   - - "@semantic-release/git"
     - assets:
-        - "src/openapi.yaml"
-        - "CHANGELOG.md"
-      message: "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
+      - "CHANGELOG.md"
+      message: "chore(release): ${nextRelease.version} [CI SKIP]\n\n${nextRelease.notes}"
+
+  - "@saithodev/semantic-release-gitea"
 
 tagFormat: "${version}"
 branches:

+ 1 - 0
cspell.config.yaml

@@ -36,6 +36,7 @@ words:
   - korr
   - kryg
   - lalg
+  - markdownlint
   - mgli
   - Modulplaner OpenAPI
   - modulplaner_openapi

+ 10 - 2
makefile

@@ -1,25 +1,33 @@
+.PHONY: pre-commit-install
 pre-commit-install:
 	pre-commit install;
 	pre-commit install --hook-type commit-msg;
 
+.PHONY: update-template
 update-template:
 	copier update --trust --defaults
 
 # https://copier.readthedocs.io/en/stable/updating/#recover-from-a-broken-update
+.PHONY: update-template-forced
 update-template-forced:
 	copier recopy $$project --trust
 
+.PHONY: cspell-filenames
 cspell-filenames:
 	git ls-files | cspell stdin --show-context --locale en-GB,de-CH
 
+.PHONY: lint
 lint:
 	cd src; redocly lint openapi.yaml
 
+.PHONY: bundle
 bundle:
 	cd src; redocly bundle openapi.yaml -o ../out/openapi.json
 
+.PHONY: preview-docs
 preview-docs: bundle
-	docker run -p 8080:8080 -e SWAGGER_JSON=/out/openapi.json -e DOC_EXPANSION=none -v $(PWD)/out:/out swaggerapi/swagger-ui
+	docker run --rm -p 8080:8080 -e SWAGGER_JSON=/out/openapi.json -e DOC_EXPANSION=none -v $(PWD)/out:/out swaggerapi/swagger-ui
 
+.PHONY: preview-docs-redocly
 preview-docs-redocly: bundle
-	docker run -p 8080:80 -e SPEC_URL=/out/openapi.json -v $(PWD)/out:/usr/share/nginx/html/out redocly/redoc
+	docker run --rm -p 8080:80 -e SPEC_URL=/out/openapi.json -v $(PWD)/out:/usr/share/nginx/html/out redocly/redoc