@tarsilla/commit-wizard 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{execSync as e}from"child_process";import t from"fs";import{analyzeCommits as a}from"@semantic-release/commit-analyzer";import{prepare as s,verifyConditions as r}from"@semantic-release/git";import{generateNotes as n}from"@semantic-release/release-notes-generator";const o={preset:"conventionalcommits",parserOpts:{headerPattern:RegExp("^(?<type>\\w+)(?<exclamation1>!?)(?:\\((?<scope>[^)]+)\\)(?<exclamation2>!?))?: (?<subject>.+)$"),headerCorrespondence:["type","exclamation1","scope","exclamation2","subject"]},releaseRules:[{type:"feat",exclamation1:"!",release:"major"},{type:"feat",exclamation2:"!",release:"major"},{type:"feat",release:"minor"},{type:"fix",release:"patch"},{type:"docs",release:"patch"},{type:"style",release:"patch"},{type:"refactor",release:"patch"},{type:"perf",release:"patch"},{type:"test",release:"patch"},{type:"build",release:"patch"},{type:"ci",release:"patch"},{type:"chore",release:"patch"},{type:"revert",release:"patch"}]};let i=!1;function c(e,t){const a=new URL(t).pathname,s=(a.startsWith("/")?a.slice(1):a).split("/").pop();return e.tap??`${s}.rb`}async function l(e,t){if(r){const{options:a}=t,s=c(e,a.repositoryUrl);await r({assets:[s],message:"chore(release): ${nextRelease.version}"},t)}i=!0}const p={addChannel:async function(e,t){},verifyConditions:l,analyzeCommits:async function(e,t){return i||(await l(e,t),i=!0),a(o,t)},generateNotes:async function(e,t){return i||(await l(e,t),i=!0),n({},t)},prepare:async function(a,r){if(i||(await l(a,r),i=!0),s){const{options:n}=r,o=c(a,n.repositoryUrl);await async function(a,s){const{nextRelease:r,logger:n,options:o}=s;if(!r?.version)throw new Error("Next release version is not available.");const i=r.version,l=o.repositoryUrl,p=`${l}/archive/refs/tags/${i}.tar.gz`,m=e(`curl -L ${p} | sha256sum | awk '{print $1}'`).toString().trim(),y=c(a,l);let f=t.readFileSync(y,"utf8");f=f.replace(/url ".*"/,`url "${p}"`),f=f.replace(/sha256 ".*"/,`sha256 "${m}"`),t.writeFileSync(y,f),n.log(`Updated formula with version ${i}, URL ${p}, and SHA256 ${m}`)}(a,r),await s({assets:[o],message:"chore(release): ${nextRelease.version}"},r)}},publish:async function(e,t){return null},success:async function(e,t){},fail:async function(e,t){}};export{p as default};
1
+ import{execSync as e}from"child_process";import t from"fs";import{analyzeCommits as a}from"@semantic-release/commit-analyzer";import{prepare as s,verifyConditions as r}from"@semantic-release/git";import{generateNotes as n}from"@semantic-release/release-notes-generator";const o={preset:"conventionalcommits",parserOpts:{headerPattern:RegExp("^(?<type>\\w+)(?<exclamation1>!?)(?:\\((?<scope>[^)]+)\\)(?<exclamation2>!?))?: (?<subject>.+)$"),headerCorrespondence:["type","exclamation1","scope","exclamation2","subject"]},releaseRules:[{type:"feat",exclamation1:"!",release:"major"},{type:"feat",exclamation2:"!",release:"major"},{type:"feat",release:"minor"},{type:"fix",release:"patch"},{type:"docs",release:"patch"},{type:"style",release:"patch"},{type:"refactor",release:"patch"},{type:"perf",release:"patch"},{type:"test",release:"patch"},{type:"build",release:"patch"},{type:"ci",release:"patch"},{type:"chore",release:"patch"},{type:"revert",release:"patch"}]};let i=!1;function c(e,t){const a=new URL(t).pathname,s=(a.startsWith("/")?a.slice(1):a).split("/").pop();return e.tap??`${s}.rb`}async function l(e,t){if(r){const{options:a}=t,s=c(e,a.repositoryUrl);await r({assets:[s],message:"chore(release): ${nextRelease.version}"},t)}i=!0}const p={addChannel:async function(e,t){},verifyConditions:l,analyzeCommits:async function(e,t){return i||(await l(e,t),i=!0),a(o,t)},generateNotes:async function(e,t){return i||(await l(e,t),i=!0),n({},t)},prepare:async function(a,r){if(i||(await l(a,r),i=!0),s){const{options:n}=r,o=c(a,n.repositoryUrl);await async function(a,s){const{nextRelease:r,logger:n,options:o}=s;if(!r?.version)throw new Error("Next release version is not available.");const i=r.version,l=o.repositoryUrl,p=new URL(l).pathname,m=`https://codeload.github.com/${p.startsWith("/")?p.slice(1):p}/tar.gz/refs/tags/v${i}`,y=e(`curl -L ${m} | sha256sum | awk '{print $1}'`).toString().trim(),f=c(a,l);let h=t.readFileSync(f,"utf8");h=h.replace(/url ".*"/,`url "${m}"`),h=h.replace(/sha256 ".*"/,`sha256 "${y}"`),t.writeFileSync(f,h),n.log(`Updated formula with version ${i}, URL ${m}, and SHA256 ${y}`)}(a,r),await s({assets:[o],message:"chore(release): ${nextRelease.version}"},r)}},publish:async function(e,t){return null},success:async function(e,t){},fail:async function(e,t){}};export{p as default};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/semantic-release/brew/index.ts"],"sourcesContent":["import { execSync } from 'child_process';\nimport fs from 'fs';\n\n//@ts-ignore\nimport { analyzeCommits as commitAnalyzerAnalyzeCommits } from '@semantic-release/commit-analyzer';\nimport {\n prepare as gitPrepare,\n verifyConditions as gitVerifyConditions,\n //@ts-ignore\n} from '@semantic-release/git';\n//@ts-ignore\nimport { generateNotes as notesGeneratorGenerateNotes } from '@semantic-release/release-notes-generator';\nimport {\n AddChannelContext,\n AnalyzeCommitsContext,\n FailContext,\n GenerateNotesContext,\n PrepareContext,\n PublishContext,\n SuccessContext,\n VerifyConditionsContext,\n} from 'semantic-release';\n\nimport { SemanticReleasePlugin } from '../types.js';\n\nconst analyzerConfig = {\n preset: 'conventionalcommits',\n parserOpts: {\n headerPattern: /^(?<type>\\w+)(?<exclamation1>!?)(?:\\((?<scope>[^)]+)\\)(?<exclamation2>!?))?: (?<subject>.+)$/,\n headerCorrespondence: ['type', 'exclamation1', 'scope', 'exclamation2', 'subject'],\n },\n releaseRules: [\n { type: 'feat', exclamation1: '!', release: 'major' },\n { type: 'feat', exclamation2: '!', release: 'major' },\n { type: 'feat', release: 'minor' },\n { type: 'fix', release: 'patch' },\n { type: 'docs', release: 'patch' },\n { type: 'style', release: 'patch' },\n { type: 'refactor', release: 'patch' },\n { type: 'perf', release: 'patch' },\n { type: 'test', release: 'patch' },\n { type: 'build', release: 'patch' },\n { type: 'ci', release: 'patch' },\n { type: 'chore', release: 'patch' },\n { type: 'revert', release: 'patch' },\n ],\n};\n\ntype PluginConfig = { tap?: string };\n\nlet verified = false;\n\nfunction getFormulaFile(pluginConfig: PluginConfig, repositoryUrl: string): string {\n const url = new URL(repositoryUrl);\n const repositoryPath = url.pathname;\n const repository = repositoryPath.startsWith('/') ? repositoryPath.slice(1) : repositoryPath;\n const project = repository.split('/').pop();\n\n return pluginConfig.tap ?? `${project}.rb`;\n}\n\nasync function updateFormulaFile(pluginConfig: PluginConfig, context: PrepareContext): Promise<void> {\n const { nextRelease, logger, options } = context;\n\n if (!nextRelease?.version) {\n throw new Error('Next release version is not available.');\n }\n\n const version = nextRelease.version;\n\n const repositoryUrl = options.repositoryUrl!; // Guaranteed to be defined by semantic-release\n\n const tarUrl = `${repositoryUrl}/archive/refs/tags/${version}.tar.gz`;\n const sha256 = execSync(`curl -L ${tarUrl} | sha256sum | awk '{print $1}'`).toString().trim();\n const formulaFile = getFormulaFile(pluginConfig, repositoryUrl);\n\n let formulaContent = fs.readFileSync(formulaFile, 'utf8');\n formulaContent = formulaContent.replace(/url \".*\"/, `url \"${tarUrl}\"`);\n formulaContent = formulaContent.replace(/sha256 \".*\"/, `sha256 \"${sha256}\"`);\n fs.writeFileSync(formulaFile, formulaContent);\n\n logger.log(`Updated formula with version ${version}, URL ${tarUrl}, and SHA256 ${sha256}`);\n}\n\nasync function addChannel(_pluginConfig: PluginConfig, _context: AddChannelContext): Promise<void> {\n //do nothing\n}\n\nasync function analyzeCommits(pluginConfig: PluginConfig, context: AnalyzeCommitsContext): Promise<string | false> {\n if (!verified) {\n await verifyConditions(pluginConfig, context);\n verified = true;\n }\n\n return commitAnalyzerAnalyzeCommits(analyzerConfig, context);\n}\n\nasync function fail(_pluginConfig: PluginConfig, _context: FailContext): Promise<void> {\n //do nothing\n}\n\nasync function generateNotes(pluginConfig: PluginConfig, context: GenerateNotesContext): Promise<string> {\n if (!verified) {\n await verifyConditions(pluginConfig, context);\n verified = true;\n }\n\n return notesGeneratorGenerateNotes({}, context);\n}\n\nasync function prepare(pluginConfig: PluginConfig, context: PrepareContext): Promise<void> {\n if (!verified) {\n await verifyConditions(pluginConfig, context);\n verified = true;\n }\n\n if (gitPrepare) {\n const { options } = context;\n const repositoryUrl = options.repositoryUrl!; // Guaranteed to be defined by semantic-release\n const formulaFile = getFormulaFile(pluginConfig, repositoryUrl);\n\n await updateFormulaFile(pluginConfig, context);\n\n await gitPrepare(\n {\n assets: [formulaFile],\n message: 'chore(release): ${nextRelease.version}',\n },\n context,\n );\n }\n}\n\nasync function publish(_pluginConfig: PluginConfig, _context: PublishContext): Promise<unknown> {\n //do nothing\n return null;\n}\n\nasync function success(_pluginConfig: PluginConfig, _context: SuccessContext): Promise<void> {\n //do nothing\n}\n\nasync function verifyConditions(pluginConfig: PluginConfig, context: VerifyConditionsContext): Promise<void> {\n if (gitVerifyConditions) {\n const { options } = context;\n const repositoryUrl = options.repositoryUrl!; // Guaranteed to be defined by semantic-release\n const formulaFile = getFormulaFile(pluginConfig, repositoryUrl);\n await gitVerifyConditions(\n {\n assets: [formulaFile],\n message: 'chore(release): ${nextRelease.version}',\n },\n context,\n );\n }\n verified = true;\n}\n\nconst plugin: SemanticReleasePlugin<{ tap: string }> = {\n addChannel,\n verifyConditions,\n analyzeCommits,\n generateNotes,\n prepare,\n publish,\n success,\n fail,\n};\n\nexport default plugin;\n"],"names":["analyzerConfig","preset","parserOpts","headerPattern","RegExp","headerCorrespondence","releaseRules","type","exclamation1","release","exclamation2","verified","getFormulaFile","pluginConfig","repositoryUrl","repositoryPath","URL","pathname","project","startsWith","slice","split","pop","tap","async","verifyConditions","context","gitVerifyConditions","options","formulaFile","assets","message","plugin","addChannel","_pluginConfig","_context","analyzeCommits","commitAnalyzerAnalyzeCommits","generateNotes","notesGeneratorGenerateNotes","prepare","gitPrepare","nextRelease","logger","version","Error","tarUrl","sha256","execSync","toString","trim","formulaContent","fs","readFileSync","replace","writeFileSync","log","updateFormulaFile","publish","success","fail"],"mappings":"8QAyBA,MAAMA,EAAiB,CACrBC,OAAQ,sBACRC,WAAY,CACVC,cAAeC,OAAA,mGACfC,qBAAsB,CAAC,OAAQ,eAAgB,QAAS,eAAgB,YAE1EC,aAAc,CACZ,CAAEC,KAAM,OAAQC,aAAc,IAAKC,QAAS,SAC5C,CAAEF,KAAM,OAAQG,aAAc,IAAKD,QAAS,SAC5C,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,MAAOE,QAAS,SACxB,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,QAASE,QAAS,SAC1B,CAAEF,KAAM,WAAYE,QAAS,SAC7B,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,QAASE,QAAS,SAC1B,CAAEF,KAAM,KAAME,QAAS,SACvB,CAAEF,KAAM,QAASE,QAAS,SAC1B,CAAEF,KAAM,SAAUE,QAAS,WAM/B,IAAIE,GAAW,EAEf,SAASC,EAAeC,EAA4BC,GAClD,MACMC,EADM,IAAIC,IAAIF,GACOG,SAErBC,GADaH,EAAeI,WAAW,KAAOJ,EAAeK,MAAM,GAAKL,GACnDM,MAAM,KAAKC,MAEtC,OAAOT,EAAaU,KAAO,GAAGL,MAChC,CAmFAM,eAAeC,EAAiBZ,EAA4Ba,GAC1D,GAAIC,EAAqB,CACvB,MAAMC,QAAEA,GAAYF,EAEdG,EAAcjB,EAAeC,EADbe,EAAQd,qBAExBa,EACJ,CACEG,OAAQ,CAACD,GACTE,QAAS,0CAEXL,EAEJ,CACAf,GAAW,CACb,CAEA,MAAMqB,EAAiD,CACrDC,WA3EFT,eAA0BU,EAA6BC,GAEvD,EA0EEV,mBACAW,eAzEFZ,eAA8BX,EAA4Ba,GAMxD,OALKf,UACGc,EAAiBZ,EAAca,GACrCf,GAAW,GAGN0B,EAA6BrC,EAAgB0B,EACtD,EAmEEY,cA7DFd,eAA6BX,EAA4Ba,GAMvD,OALKf,UACGc,EAAiBZ,EAAca,GACrCf,GAAW,GAGN4B,EAA4B,CAAIb,EAAAA,EACzC,EAuDEc,QArDFhB,eAAuBX,EAA4Ba,GAMjD,GALKf,UACGc,EAAiBZ,EAAca,GACrCf,GAAW,GAGT8B,EAAY,CACd,MAAMb,QAAEA,GAAYF,EAEdG,EAAcjB,EAAeC,EADbe,EAAQd,qBAzDlCU,eAAiCX,EAA4Ba,GAC3D,MAAMgB,YAAEA,EAAWC,OAAEA,EAAMf,QAAEA,GAAYF,EAEzC,IAAKgB,GAAaE,QAChB,MAAM,IAAIC,MAAM,0CAGlB,MAAMD,EAAUF,EAAYE,QAEtB9B,EAAgBc,EAAQd,cAExBgC,EAAS,GAAGhC,uBAAmC8B,WAC/CG,EAASC,EAAS,WAAWF,oCAAyCG,WAAWC,OACjFrB,EAAcjB,EAAeC,EAAcC,GAEjD,IAAIqC,EAAiBC,EAAGC,aAAaxB,EAAa,QAClDsB,EAAiBA,EAAeG,QAAQ,WAAY,QAAQR,MAC5DK,EAAiBA,EAAeG,QAAQ,cAAe,WAAWP,MAClEK,EAAGG,cAAc1B,EAAasB,GAE9BR,EAAOa,IAAI,gCAAgCZ,UAAgBE,iBAAsBC,IACnF,CAuCUU,CAAkB5C,EAAca,SAEhCe,EACJ,CACEX,OAAQ,CAACD,GACTE,QAAS,0CAEXL,EAEJ,CACF,EAiCEgC,QA/BFlC,eAAuBU,EAA6BC,GAElD,OAAO,IACT,EA6BEwB,QA3BFnC,eAAuBU,EAA6BC,GAEpD,EA0BEyB,KArEFpC,eAAoBU,EAA6BC,GAEjD"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/semantic-release/brew/index.ts"],"sourcesContent":["import { execSync } from 'child_process';\nimport fs from 'fs';\n\n//@ts-ignore\nimport { analyzeCommits as commitAnalyzerAnalyzeCommits } from '@semantic-release/commit-analyzer';\nimport {\n prepare as gitPrepare,\n verifyConditions as gitVerifyConditions,\n //@ts-ignore\n} from '@semantic-release/git';\n//@ts-ignore\nimport { generateNotes as notesGeneratorGenerateNotes } from '@semantic-release/release-notes-generator';\nimport {\n AddChannelContext,\n AnalyzeCommitsContext,\n FailContext,\n GenerateNotesContext,\n PrepareContext,\n PublishContext,\n SuccessContext,\n VerifyConditionsContext,\n} from 'semantic-release';\n\nimport { SemanticReleasePlugin } from '../types.js';\n\nconst analyzerConfig = {\n preset: 'conventionalcommits',\n parserOpts: {\n headerPattern: /^(?<type>\\w+)(?<exclamation1>!?)(?:\\((?<scope>[^)]+)\\)(?<exclamation2>!?))?: (?<subject>.+)$/,\n headerCorrespondence: ['type', 'exclamation1', 'scope', 'exclamation2', 'subject'],\n },\n releaseRules: [\n { type: 'feat', exclamation1: '!', release: 'major' },\n { type: 'feat', exclamation2: '!', release: 'major' },\n { type: 'feat', release: 'minor' },\n { type: 'fix', release: 'patch' },\n { type: 'docs', release: 'patch' },\n { type: 'style', release: 'patch' },\n { type: 'refactor', release: 'patch' },\n { type: 'perf', release: 'patch' },\n { type: 'test', release: 'patch' },\n { type: 'build', release: 'patch' },\n { type: 'ci', release: 'patch' },\n { type: 'chore', release: 'patch' },\n { type: 'revert', release: 'patch' },\n ],\n};\n\ntype PluginConfig = { tap?: string };\n\nlet verified = false;\n\nfunction getFormulaFile(pluginConfig: PluginConfig, repositoryUrl: string): string {\n const url = new URL(repositoryUrl);\n const repositoryPath = url.pathname;\n const repository = repositoryPath.startsWith('/') ? repositoryPath.slice(1) : repositoryPath;\n const project = repository.split('/').pop();\n\n return pluginConfig.tap ?? `${project}.rb`;\n}\n\nasync function updateFormulaFile(pluginConfig: PluginConfig, context: PrepareContext): Promise<void> {\n const { nextRelease, logger, options } = context;\n\n if (!nextRelease?.version) {\n throw new Error('Next release version is not available.');\n }\n\n const version = nextRelease.version;\n\n const repositoryUrl = options.repositoryUrl!; // Guaranteed to be defined by semantic-release\n const url = new URL(repositoryUrl);\n const repositoryPath = url.pathname;\n const repository = repositoryPath.startsWith('/') ? repositoryPath.slice(1) : repositoryPath;\n\n const tarUrl = `https://codeload.github.com/${repository}/tar.gz/refs/tags/v${version}`;\n const sha256 = execSync(`curl -L ${tarUrl} | sha256sum | awk '{print $1}'`).toString().trim();\n const formulaFile = getFormulaFile(pluginConfig, repositoryUrl);\n\n let formulaContent = fs.readFileSync(formulaFile, 'utf8');\n formulaContent = formulaContent.replace(/url \".*\"/, `url \"${tarUrl}\"`);\n formulaContent = formulaContent.replace(/sha256 \".*\"/, `sha256 \"${sha256}\"`);\n fs.writeFileSync(formulaFile, formulaContent);\n\n logger.log(`Updated formula with version ${version}, URL ${tarUrl}, and SHA256 ${sha256}`);\n}\n\nasync function addChannel(_pluginConfig: PluginConfig, _context: AddChannelContext): Promise<void> {\n //do nothing\n}\n\nasync function analyzeCommits(pluginConfig: PluginConfig, context: AnalyzeCommitsContext): Promise<string | false> {\n if (!verified) {\n await verifyConditions(pluginConfig, context);\n verified = true;\n }\n\n return commitAnalyzerAnalyzeCommits(analyzerConfig, context);\n}\n\nasync function fail(_pluginConfig: PluginConfig, _context: FailContext): Promise<void> {\n //do nothing\n}\n\nasync function generateNotes(pluginConfig: PluginConfig, context: GenerateNotesContext): Promise<string> {\n if (!verified) {\n await verifyConditions(pluginConfig, context);\n verified = true;\n }\n\n return notesGeneratorGenerateNotes({}, context);\n}\n\nasync function prepare(pluginConfig: PluginConfig, context: PrepareContext): Promise<void> {\n if (!verified) {\n await verifyConditions(pluginConfig, context);\n verified = true;\n }\n\n if (gitPrepare) {\n const { options } = context;\n const repositoryUrl = options.repositoryUrl!; // Guaranteed to be defined by semantic-release\n const formulaFile = getFormulaFile(pluginConfig, repositoryUrl);\n\n await updateFormulaFile(pluginConfig, context);\n\n await gitPrepare(\n {\n assets: [formulaFile],\n message: 'chore(release): ${nextRelease.version}',\n },\n context,\n );\n }\n}\n\nasync function publish(_pluginConfig: PluginConfig, _context: PublishContext): Promise<unknown> {\n //do nothing\n return null;\n}\n\nasync function success(_pluginConfig: PluginConfig, _context: SuccessContext): Promise<void> {\n //do nothing\n}\n\nasync function verifyConditions(pluginConfig: PluginConfig, context: VerifyConditionsContext): Promise<void> {\n if (gitVerifyConditions) {\n const { options } = context;\n const repositoryUrl = options.repositoryUrl!; // Guaranteed to be defined by semantic-release\n const formulaFile = getFormulaFile(pluginConfig, repositoryUrl);\n await gitVerifyConditions(\n {\n assets: [formulaFile],\n message: 'chore(release): ${nextRelease.version}',\n },\n context,\n );\n }\n verified = true;\n}\n\nconst plugin: SemanticReleasePlugin<{ tap: string }> = {\n addChannel,\n verifyConditions,\n analyzeCommits,\n generateNotes,\n prepare,\n publish,\n success,\n fail,\n};\n\nexport default plugin;\n"],"names":["analyzerConfig","preset","parserOpts","headerPattern","RegExp","headerCorrespondence","releaseRules","type","exclamation1","release","exclamation2","verified","getFormulaFile","pluginConfig","repositoryUrl","repositoryPath","URL","pathname","project","startsWith","slice","split","pop","tap","async","verifyConditions","context","gitVerifyConditions","options","formulaFile","assets","message","plugin","addChannel","_pluginConfig","_context","analyzeCommits","commitAnalyzerAnalyzeCommits","generateNotes","notesGeneratorGenerateNotes","prepare","gitPrepare","nextRelease","logger","version","Error","tarUrl","sha256","execSync","toString","trim","formulaContent","fs","readFileSync","replace","writeFileSync","log","updateFormulaFile","publish","success","fail"],"mappings":"8QAyBA,MAAMA,EAAiB,CACrBC,OAAQ,sBACRC,WAAY,CACVC,cAAeC,OAAA,mGACfC,qBAAsB,CAAC,OAAQ,eAAgB,QAAS,eAAgB,YAE1EC,aAAc,CACZ,CAAEC,KAAM,OAAQC,aAAc,IAAKC,QAAS,SAC5C,CAAEF,KAAM,OAAQG,aAAc,IAAKD,QAAS,SAC5C,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,MAAOE,QAAS,SACxB,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,QAASE,QAAS,SAC1B,CAAEF,KAAM,WAAYE,QAAS,SAC7B,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,OAAQE,QAAS,SACzB,CAAEF,KAAM,QAASE,QAAS,SAC1B,CAAEF,KAAM,KAAME,QAAS,SACvB,CAAEF,KAAM,QAASE,QAAS,SAC1B,CAAEF,KAAM,SAAUE,QAAS,WAM/B,IAAIE,GAAW,EAEf,SAASC,EAAeC,EAA4BC,GAClD,MACMC,EADM,IAAIC,IAAIF,GACOG,SAErBC,GADaH,EAAeI,WAAW,KAAOJ,EAAeK,MAAM,GAAKL,GACnDM,MAAM,KAAKC,MAEtC,OAAOT,EAAaU,KAAO,GAAGL,MAChC,CAsFAM,eAAeC,EAAiBZ,EAA4Ba,GAC1D,GAAIC,EAAqB,CACvB,MAAMC,QAAEA,GAAYF,EAEdG,EAAcjB,EAAeC,EADbe,EAAQd,qBAExBa,EACJ,CACEG,OAAQ,CAACD,GACTE,QAAS,0CAEXL,EAEJ,CACAf,GAAW,CACb,CAEA,MAAMqB,EAAiD,CACrDC,WA3EFT,eAA0BU,EAA6BC,GAEvD,EA0EEV,mBACAW,eAzEFZ,eAA8BX,EAA4Ba,GAMxD,OALKf,UACGc,EAAiBZ,EAAca,GACrCf,GAAW,GAGN0B,EAA6BrC,EAAgB0B,EACtD,EAmEEY,cA7DFd,eAA6BX,EAA4Ba,GAMvD,OALKf,UACGc,EAAiBZ,EAAca,GACrCf,GAAW,GAGN4B,EAA4B,CAAIb,EAAAA,EACzC,EAuDEc,QArDFhB,eAAuBX,EAA4Ba,GAMjD,GALKf,UACGc,EAAiBZ,EAAca,GACrCf,GAAW,GAGT8B,EAAY,CACd,MAAMb,QAAEA,GAAYF,EAEdG,EAAcjB,EAAeC,EADbe,EAAQd,qBA5DlCU,eAAiCX,EAA4Ba,GAC3D,MAAMgB,YAAEA,EAAWC,OAAEA,EAAMf,QAAEA,GAAYF,EAEzC,IAAKgB,GAAaE,QAChB,MAAM,IAAIC,MAAM,0CAGlB,MAAMD,EAAUF,EAAYE,QAEtB9B,EAAgBc,EAAQd,cAExBC,EADM,IAAIC,IAAIF,GACOG,SAGrB6B,EAAS,+BAFI/B,EAAeI,WAAW,KAAOJ,EAAeK,MAAM,GAAKL,uBAEA6B,IACxEG,EAASC,EAAS,WAAWF,oCAAyCG,WAAWC,OACjFrB,EAAcjB,EAAeC,EAAcC,GAEjD,IAAIqC,EAAiBC,EAAGC,aAAaxB,EAAa,QAClDsB,EAAiBA,EAAeG,QAAQ,WAAY,QAAQR,MAC5DK,EAAiBA,EAAeG,QAAQ,cAAe,WAAWP,MAClEK,EAAGG,cAAc1B,EAAasB,GAE9BR,EAAOa,IAAI,gCAAgCZ,UAAgBE,iBAAsBC,IACnF,CAuCUU,CAAkB5C,EAAca,SAEhCe,EACJ,CACEX,OAAQ,CAACD,GACTE,QAAS,0CAEXL,EAEJ,CACF,EAiCEgC,QA/BFlC,eAAuBU,EAA6BC,GAElD,OAAO,IACT,EA6BEwB,QA3BFnC,eAAuBU,EAA6BC,GAEpD,EA0BEyB,KArEFpC,eAAoBU,EAA6BC,GAEjD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarsilla/commit-wizard",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -69,8 +69,11 @@ async function updateFormulaFile(pluginConfig: PluginConfig, context: PrepareCon
69
69
  const version = nextRelease.version;
70
70
 
71
71
  const repositoryUrl = options.repositoryUrl!; // Guaranteed to be defined by semantic-release
72
+ const url = new URL(repositoryUrl);
73
+ const repositoryPath = url.pathname;
74
+ const repository = repositoryPath.startsWith('/') ? repositoryPath.slice(1) : repositoryPath;
72
75
 
73
- const tarUrl = `${repositoryUrl}/archive/refs/tags/${version}.tar.gz`;
76
+ const tarUrl = `https://codeload.github.com/${repository}/tar.gz/refs/tags/v${version}`;
74
77
  const sha256 = execSync(`curl -L ${tarUrl} | sha256sum | awk '{print $1}'`).toString().trim();
75
78
  const formulaFile = getFormulaFile(pluginConfig, repositoryUrl);
76
79