{
  "dependencies": {
    "@google/semantic-release-replace-plugin": "^1.1.0",
    "@semantic-release/changelog": "^6.0.1",
    "@semantic-release/exec": "^6.0.3",
    "@semantic-release/git": "^10.0.1",
    "is-ci": "^3.0.1",
    "semantic-release": "^19.0.2"
  },
  "devDependencies": {
    "@commitlint/cli": "^16.1.0",
    "@commitlint/config-conventional": "^16.0.0",
    "commitlint": "^16.1.0",
    "husky": "^7.0.4",
    "pinst": "^2.1.6"
  },
  "commitlint": {
    "extends": [
      "@commitlint/config-conventional"
    ]
  },
  "release": {
    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      [
        "@google/semantic-release-replace-plugin",
        {
          "replacements": [
            {
              "files": [
                "gradle.properties"
              ],
              "from": "version=.*",
              "to": "version=${nextRelease.version}",
              "results": [
                {
                  "file": "gradle.properties",
                  "hasChanged": true,
                  "numMatches": 1,
                  "numReplacements": 1
                }
              ],
              "countMatches": true
            }
          ]
        }
      ],
      [
        "@semantic-release/exec",
        {
          "prepareCmd": "ci/prepare-release.sh ${nextRelease.version} ${nextRelease.channel}",
          "publishCmd": "ci/publish-dockerhub.sh ${nextRelease.version} ${nextRelease.channel}"
        }
      ],
      [
        "@semantic-release/git",
        {
          "assets": [
            "gradle.properties",
            "CHANGELOG.md",
            "komga/docs/openapi.json"
          ]
        }
      ],
      [
        "@semantic-release/github",
        {
          "assets": [
            {
              "path": "komga/build/libs/*.jar"
            }
          ]
        }
      ]
    ]
  },
  "scripts": {
    "prepare": "is-ci || husky install",
    "postinstall": "is-ci || husky install",
    "prepublishOnly": "pinst --disable",
    "postpublish": "pinst --enable"
  }
}
