fix: Remove unneded import. More precise path for requiring hooks
parent
c6043fb4f9
commit
040d8e90f4
|
@ -5,7 +5,6 @@ const path = require('path')
|
||||||
const getVersioning = require('./version')
|
const getVersioning = require('./version')
|
||||||
const git = require('./helpers/git')
|
const git = require('./helpers/git')
|
||||||
const changelog = require('./helpers/generateChangelog')
|
const changelog = require('./helpers/generateChangelog')
|
||||||
const resolve = require('path').resolve
|
|
||||||
|
|
||||||
async function handleVersioningByExtension(ext, file, versionPath, releaseType) {
|
async function handleVersioningByExtension(ext, file, versionPath, releaseType) {
|
||||||
const versioning = getVersioning(ext)
|
const versioning = getVersioning(ext)
|
||||||
|
@ -66,7 +65,7 @@ async function run() {
|
||||||
core.info('Pull to make sure we have the full git history')
|
core.info('Pull to make sure we have the full git history')
|
||||||
await git.pull()
|
await git.pull()
|
||||||
|
|
||||||
const config = conventionalConfigFile && require(resolve(process.cwd(), conventionalConfigFile))
|
const config = conventionalConfigFile && require(path.resolve(process.cwd(), conventionalConfigFile))
|
||||||
|
|
||||||
conventionalRecommendedBump({ preset, tagPrefix, config }, async (error, recommendation) => {
|
conventionalRecommendedBump({ preset, tagPrefix, config }, async (error, recommendation) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
@ -113,7 +112,7 @@ async function run() {
|
||||||
let gitTag = `${tagPrefix}${newVersion}`
|
let gitTag = `${tagPrefix}${newVersion}`
|
||||||
|
|
||||||
if (preChangelogGeneration) {
|
if (preChangelogGeneration) {
|
||||||
const newVersionAndTag = await require(path.resolve(preChangelogGeneration)).preChangelogGeneration({
|
const newVersionAndTag = await require(path.resolve(process.cwd(), preChangelogGeneration)).preChangelogGeneration({
|
||||||
tag: gitTag,
|
tag: gitTag,
|
||||||
version: newVersion,
|
version: newVersion,
|
||||||
})
|
})
|
||||||
|
@ -149,7 +148,7 @@ async function run() {
|
||||||
if (!skipCommit) {
|
if (!skipCommit) {
|
||||||
// Add changed files to git
|
// Add changed files to git
|
||||||
if (preCommit) {
|
if (preCommit) {
|
||||||
await require(path.resolve(preCommit)).preCommit({
|
await require(path.resolve(process.cwd(), preCommit)).preCommit({
|
||||||
tag: gitTag,
|
tag: gitTag,
|
||||||
version: newVersion,
|
version: newVersion,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue