mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
6 hours ago 29f0f4df0774f5c91ff25ed67b72c751919f6e8d
build(fix): update version numbers and fix release setup
2 files deleted
4 files modified
1 files renamed
216 ■■■■ changed files
.github/workflows/release.yml 47 ●●●●● patch | view | raw | blame | history
.release-it.publish.ts 107 ●●●●● patch | view | raw | blame | history
.release-it.ts 34 ●●●● patch | view | raw | blame | history
.vscode/settings.json 2 ●●● patch | view | raw | blame | history
CONTRIBUTING.md 13 ●●●●● patch | view | raw | blame | history
package-lock.json 4 ●●●● patch | view | raw | blame | history
package.json 9 ●●●●● patch | view | raw | blame | history
.github/workflows/release.yml
File was deleted
.release-it.publish.ts
File was deleted
.release-it.ts
File was renamed from .release-it.prepare.ts
@@ -12,14 +12,14 @@
            encoding: "utf8",
            stdio: ["ignore", "pipe", "pipe"],
        }).trim();
    } catch (error) {
    } catch (error: unknown) {
        console.error("Failed to determine the current Git branch.");
        console.error(error);
        process.exit(1);
    }
}
function hasPreReleaseFlag(argv: string[]): boolean {
function isPreReleaseRun(argv: string[]): boolean {
    return argv.some((argument) => {
        return (
            argument === "--preRelease" ||
@@ -30,41 +30,41 @@
    });
}
const branch = getCurrentBranch();
const isPreRelease = hasPreReleaseFlag(process.argv);
const currentBranch = getCurrentBranch();
const preReleaseRun = isPreReleaseRun(process.argv);
if (isPreRelease && branch !== "staging") {
if (preReleaseRun && currentBranch !== "development") {
    console.error(
        `Pre-releases are only allowed from "staging". Current branch: "${branch}".`,
        `Pre-releases are only allowed on "development". Current branch: "${currentBranch}".`,
    );
    process.exit(1);
}
if (!isPreRelease && branch !== "maintenance" && branch !== "staging") {
if (!preReleaseRun && currentBranch !== "main") {
    console.error(
        `Stable releases are only allowed from "maintenance" and "staging". Current branch: "${branch}".`,
        `Stable releases are only allowed on "main". Current branch: "${currentBranch}".`,
    );
    process.exit(1);
}
const config: Config = {
const config = {
    npm: {
        publish: false,
    },
    git: {
        requireCleanWorkingDir: true,
        requireUpstream: true,
        requireCommits: true,
        requireBranch: branch,
        requireBranch: currentBranch,
        commit: true,
        commitMessage: "chore(release): v${version}",
        commitArgs: ["--no-verify"],
        tag: false,
        tag: true,
        tagName: "v${version}",
        push: true,
        pushArgs: ["--follow-tags"],
    },
    github: {
        release: false,
    },
    npm: {
        publish: false,
    },
    plugins: {
        "@release-it/conventional-changelog": {
            infile: "CHANGELOG.md",
@@ -144,4 +144,4 @@
    },
} satisfies Config;
export default config;
export default config;
.vscode/settings.json
@@ -25,7 +25,7 @@
    },
    "explorer.fileNesting.enabled": true,
    "explorer.fileNesting.patterns": {
        "package.json": "package-lock.json, netlify.toml, .lintstagedrc.js, .release-it.*.ts, .markdownlint*, .nvmrc, lychee.toml, tsconfig.json, .coderabbit.yaml",
        "package.json": "package-lock.json, netlify.toml, .lintstagedrc.js, .release-it.ts, .markdownlint*, .nvmrc, lychee.toml, tsconfig.json, .coderabbit.yaml",
        "theme.toml": "go.mod, go.sum",
        "README.md": "CHANGELOG.md, LICENSE.md, CONTRIBUTING.md, RELEASES.md, DESIGN.md",
        "*.ts": "$(capture).md, $(capture).test.ts, $(capture).spec.ts, $(capture).d.ts, $(capture).map, $(capture).js, $(capture).jsx, $(capture).tsx"
CONTRIBUTING.md
@@ -33,7 +33,7 @@
The project follows a structured release workflow based on conventional commits, staging branches, and automated versioning.
For details, see [RELEASES.md](./RELEASES.md).
For details, see [Branch Strategy](#branch-strategy).
## Before You Start
@@ -73,11 +73,9 @@
```mermaid
flowchart LR
 feature["feature/*, fix/*, docs/*, refactor/*"] --> development
 development --> staging
 maintenance --> staging
 staging --> main
 main --> staging
 staging --> development
 development --> main
 maintenance --> main
 main --> development
```
This repository uses a linear, rebase-based branch model. Long-lived branches MUST stay connected to `main`, and merge commits MUST NOT be introduced.
@@ -87,8 +85,7 @@
| Branch  | Purpose  | Release role | Write policy | Merge  |
| --- | --- | --- | --- | --- |
| `main`  | Stable source of truth | releases | Protected. Only receives reviewed PRs from `staging` or `maintenance`. | Rebase |
| `staging` | Pre-release integration | pre-releases | Protected. Only receives reviewed PRs from `development`.  | Rebase |
| `development` | Active development | none | Feature, fix, chore, and documentation PRs target this branch. | Squash |
| `development` | Active development | pre-releases | Feature, fix, chore, and documentation PRs target this branch. | Squash |
| `maintenance` | Dependency maintenance  | none | Maintainer-only branch for dependency version updates. | Rebase |
### Branch naming
package-lock.json
@@ -1,12 +1,12 @@
{
    "name": "@gohugo-ananke/ananke",
    "version": "2.14.0",
    "version": "2.15.0",
    "lockfileVersion": 3,
    "requires": true,
    "packages": {
        "": {
            "name": "@gohugo-ananke/ananke",
            "version": "2.14.0",
            "version": "2.15.0",
            "license": "MIT",
            "dependencies": {
                "cssnano": "8.0.1",
package.json
@@ -1,7 +1,7 @@
{
    "name": "@gohugo-ananke/ananke",
    "description": "Ananke: A theme for Hugo Sites",
    "version": "2.14.0",
    "version": "2.15.0",
    "license": "MIT",
    "repository": "gohugo-ananke/ananke",
    "author": "Bud Parr (https://github.com/budparr)",
@@ -56,9 +56,8 @@
        "lint:markdown": "markdownlint-cli2",
        "lint:markdown:fix": "markdownlint-cli2 --fix",
        "prepare": "simple-git-hooks install",
        "release": "release-it --config .release-it.publish.ts --ci",
        "release:pre": "release-it --preRelease=prerelease --config .release-it.prepare.ts",
        "release:prepare": "release-it --config .release-it.prepare.ts",
        "release": "release-it --config .release-it.ts",
        "release:pre": "release-it --preRelease=prerelease --config .release-it.ts",
        "server": "hugo server --environment documentation",
        "test": "node scripts/test-hugo-quickstart.ts",
        "test:quickstart": "node scripts/test-hugo-quickstart.ts",
@@ -78,4 +77,4 @@
        "pre-push": "npm run hook:push"
    },
    "type": "module"
}
}