fix: bug with retrieving submodules (#1171)
This commit is contained in:
parent
ecdfb9c92e
commit
024242fc77
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
@ -808,9 +808,12 @@ function run() {
|
|||||||
const hasSubmodule = yield (0, utils_1.submoduleExists)({ cwd: workingDirectory });
|
const hasSubmodule = yield (0, utils_1.submoduleExists)({ cwd: workingDirectory });
|
||||||
let gitExtraArgs = ['--no-tags', '--prune', '--recurse-submodules'];
|
let gitExtraArgs = ['--no-tags', '--prune', '--recurse-submodules'];
|
||||||
const isTag = (_a = env.GITHUB_REF) === null || _a === void 0 ? void 0 : _a.startsWith('refs/tags/');
|
const isTag = (_a = env.GITHUB_REF) === null || _a === void 0 ? void 0 : _a.startsWith('refs/tags/');
|
||||||
const submodulePaths = yield (0, utils_1.getSubmodulePath)({
|
const submodulePaths = [];
|
||||||
cwd: workingDirectory
|
if (hasSubmodule) {
|
||||||
});
|
submodulePaths.concat(...(yield (0, utils_1.getSubmodulePath)({
|
||||||
|
cwd: workingDirectory
|
||||||
|
})));
|
||||||
|
}
|
||||||
if (isTag) {
|
if (isTag) {
|
||||||
gitExtraArgs = ['--prune', '--no-recurse-submodules'];
|
gitExtraArgs = ['--prune', '--no-recurse-submodules'];
|
||||||
}
|
}
|
||||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
12
src/main.ts
12
src/main.ts
@ -54,9 +54,15 @@ export async function run(): Promise<void> {
|
|||||||
const hasSubmodule = await submoduleExists({cwd: workingDirectory})
|
const hasSubmodule = await submoduleExists({cwd: workingDirectory})
|
||||||
let gitExtraArgs = ['--no-tags', '--prune', '--recurse-submodules']
|
let gitExtraArgs = ['--no-tags', '--prune', '--recurse-submodules']
|
||||||
const isTag = env.GITHUB_REF?.startsWith('refs/tags/')
|
const isTag = env.GITHUB_REF?.startsWith('refs/tags/')
|
||||||
const submodulePaths = await getSubmodulePath({
|
const submodulePaths: string[] = []
|
||||||
cwd: workingDirectory
|
|
||||||
})
|
if (hasSubmodule) {
|
||||||
|
submodulePaths.concat(
|
||||||
|
...(await getSubmodulePath({
|
||||||
|
cwd: workingDirectory
|
||||||
|
}))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (isTag) {
|
if (isTag) {
|
||||||
gitExtraArgs = ['--prune', '--no-recurse-submodules']
|
gitExtraArgs = ['--prune', '--no-recurse-submodules']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user