Git tag fix
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Julien Valverdé
2023-08-31 02:47:19 +02:00
parent cfd90744bc
commit f12504000d
2 changed files with 15 additions and 2 deletions

View File

@@ -36,6 +36,18 @@ export class GitBranchRef extends GitRef {}
export class GitTagRef extends GitRef {}
export const gitFetch = pipe(
SimpleGitService,
Effect.flatMap(git =>
Effect.tryPromise({
try: () => git.fetch(),
catch: mapSimpleGitErrors,
})
),
)
export class GitRefNullNameError {}
export const getGitRefName = pipe(

View File

@@ -2,7 +2,7 @@ import { Console, Context, Effect, pipe } from "effect"
import simpleGit from "simple-git"
import { parseArgv } from "./argv"
import { parseEnv } from "./env"
import { SimpleGitService, getGitRef } from "./git"
import { SimpleGitService, getGitRef, gitFetch } from "./git"
import { DefaultMatcher, SemVerMatcher, generateDockerTagsFromGitRef } from "./matchers"
import { writeDockerTagsFile } from "./tags"
@@ -19,7 +19,8 @@ const context = Context.empty().pipe(
)
const main = pipe(
getGitRef,
gitFetch,
Effect.flatMap(() => getGitRef),
Effect.flatMap(ref => generateDockerTagsFromGitRef(ref, [
new SemVerMatcher,