-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
269cb54
commit 3e20bc9
Showing
5 changed files
with
418 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict' | ||
const config = require('conventional-changelog-conventionalcommits'); | ||
|
||
module.exports = config({ | ||
"types": [ | ||
{ type: 'feat', section: '🚀 Features' }, | ||
{ type: 'fix', section: '🐛 Fixes' }, | ||
{ type: 'perf', section: '🐎 Performance Improvements' }, | ||
{ type: 'revert', section: '⏪ Reverts' }, | ||
{ type: 'build', section: '🛠 Build System' }, | ||
{ type: 'ci', section: '💡 Continuous Integration' }, | ||
{ type: 'refactor', section: '🔥 Refactorings' }, | ||
{ type: 'doc', section: '📚 Documentation' }, | ||
{ type: 'docs', section: '📚 Documentation' }, | ||
{ type: 'style', section: '💄 Styles' }, | ||
{ type: 'test', section: '✅ Tests' }, | ||
{ type: 'wip', hidden: true }, | ||
{ type: 'chore', hidden: true }, | ||
] | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,16 @@ | ||
{ | ||
"name": "config", | ||
"version": "1.0.0", | ||
"description": "conventional-changelog-action hooks", | ||
"main": "config.js", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Soumya Ranjan Mahunt", | ||
"email": "devsoumyamahunt@gmail.com" | ||
}, | ||
"dependencies": { | ||
"@actions/core": "1.6.0", | ||
"conventional-changelog-conventionalcommits": "^4.6.3", | ||
"semver": "^7.3.5" | ||
} | ||
} |
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,30 @@ | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
const semver = require('semver'); | ||
const core = require('@actions/core'); | ||
const childProcess = require("child_process"); | ||
|
||
exports.preVersionGeneration = (version) => { | ||
const { GITHUB_WORKSPACE } = process.env; | ||
core.info(`Computed version bump: ${version}`); | ||
|
||
const gem_info_file = path.join(GITHUB_WORKSPACE, 'lib/cocoapods-embed-flutter/gem_version.rb'); | ||
const gem_info = `${fs.readFileSync(gem_info_file)}`; | ||
core.info(`Current gem info: ${gem_info}`); | ||
|
||
currentVersion = gem_info.match(/VERSION\s*=\s'(.*)'/)[1]; | ||
core.info(`Current version: ${currentVersion}`); | ||
|
||
if (semver.lt(version, currentVersion)) { version = currentVersion; } | ||
core.info(`Final version: ${version}`); | ||
|
||
const new_gem_info = gem_info.replace(/VERSION\s*=\s*.*/g, `VERSION = '${version}'.freeze`); | ||
core.info(`Updated gem info: ${new_gem_info}`); | ||
fs.writeFileSync(gem_info_file, new_gem_info); | ||
|
||
const launchOption = { cwd: GITHUB_WORKSPACE }; | ||
childProcess.execSync('bundle exec rake demo', launchOption); | ||
return version; | ||
} | ||
|
||
exports.preTagGeneration = (tag) => { } |
Oops, something went wrong.