This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (devops) Adding Commitizen, Husky and Standard Version
Indroduces Org Level Commit Compliance #16
- Loading branch information
Showing
7 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,9 @@ | |
path = packages/components | ||
url = [email protected]:HospitalRun/components.git | ||
[submodule "packages/hospitalrun-cli"] | ||
path = packages/hospitalrun-cli | ||
path = packages/cli | ||
url = [email protected]:HospitalRun/hospitalrun-cli.git | ||
[submodule "packages/frontend"] | ||
path = packages/frontend | ||
url = [email protected]:HospitalRun/hospitalrun-frontend.git | ||
branch = next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// in ".releaserc.js" or "release.config.js" | ||
|
||
const {promisify} = require('util') | ||
const dateFormat = require('dateformat') | ||
const readFileAsync = promisify(require('fs').readFile) | ||
const path = require('path') | ||
// Given a `const` variable `TEMPLATE_DIR` which points to "<semantic-release-gitmoji>/lib/assets/templates" | ||
const TEMPLATE_DIR = 'node_modules/semantic-release-gitmoji/lib/assets/templates' | ||
// the *.hbs template and partials should be passed as strings of contents | ||
const template = readFileAsync(path.join(TEMPLATE_DIR, 'default-template.hbs')) | ||
const commitTemplate = readFileAsync(path.join(TEMPLATE_DIR, 'commit-template.hbs')) | ||
|
||
module.exports = { | ||
extends: 'semantic-release-monorepo', | ||
branch: "master", | ||
generateNotes: ['semantic-release-gitmoji'], | ||
analyzeCommits: ['semantic-release-gitmoji'], | ||
plugins: [ | ||
[ | ||
'semantic-release-gitmoji', { | ||
releaseRules: { | ||
major: [':boom:'], | ||
minor: [':sparkles:'], | ||
patch: [ | ||
':bug:', | ||
':ambulance:', | ||
':lock:' | ||
] | ||
}, | ||
releaseNotes: { | ||
template: template, | ||
partials: {commitTemplate}, | ||
helpers: { | ||
datetime: function (format = 'UTC:yyyy-mm-dd') { | ||
return dateFormat(new Date(), format) | ||
} | ||
}, | ||
issueResolution: { | ||
template: '{baseUrl}/{owner}/{repo}/issues/{ref}', | ||
baseUrl: 'https://github.com', | ||
source: 'github.com' | ||
} | ||
} | ||
} | ||
], | ||
"@semantic-release/release-notes-generator", | ||
["@semantic-release/changelog", { | ||
"changelogFile": "CHANGELOG.md" | ||
}], | ||
['@semantic-release/git', { | ||
"assets": ["CHANGELOG.md", "package.json", "packages"], | ||
"message": ":bookmark: (release) ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
}] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
extends: ["gitmoji"], | ||
parserPreset: { | ||
parserOpts: { | ||
headerPattern: /^(:\w*:)(?:\s)(?:\((.*?)\))?\s((?:.*(?=\())|.*)(?:\(#(\d*)\))?/, | ||
headerCorrespondence: ["type", "scope", "subject", "ticket"] | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,28 @@ | |
"author": "Maksim Sink <[email protected]>", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"preinstall": "node -e '!process.env.npm_config_user_agent.startsWith(\"pnpm/\")&&!console.log(\" ⚠️ This is a mono-repo. Use `npx pnpm recursive install` to install dependencies in this repository ⚠️ \\n\")&&process.exit(1)'" | ||
"devDependencies": { | ||
"@commitlint/cli": "^8.1.0", | ||
"@commitlint/core": "^8.1.0", | ||
"@semantic-release/changelog": "^3.0.4", | ||
"@semantic-release/git": "^7.0.16", | ||
"@semantic-release/release-notes-generator": "^7.3.0", | ||
"commitlint-config-gitmoji": "^1.0.1", | ||
"cz-emoji": "^1.1.2", | ||
"dateformat": "^3.0.3", | ||
"husky": "^3.0.5", | ||
"pnpm": "^3.8.1", | ||
"semantic-release-gitmoji": "^1.3.2" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS", | ||
"pre-commit": "pnpm test -r" | ||
} | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-emoji" | ||
} | ||
} | ||
} | ||
} |
Submodule cli
updated
from 000000 to fdaae4