Moved the fetch step to the entrypoint
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julien Valverdé
2023-09-01 02:12:19 +02:00
parent b3e3f6b24d
commit 9612ad927b
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env sh
set -e
git fetch --tags
cd /app
exec bun start /drone/src

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, gitFetch } from "./git"
import { SimpleGitService, getGitRef } from "./git"
import { DefaultMatcher, SemVerMatcher, generateDockerTagsFromGitRef } from "./matchers"
import { writeDockerTagsFile } from "./tags"
@@ -19,8 +19,7 @@ const context = Context.empty().pipe(
)
const main = pipe(
gitFetch,
Effect.flatMap(() => getGitRef),
getGitRef,
Effect.flatMap(ref => generateDockerTagsFromGitRef(ref, [
new SemVerMatcher,