diff --git a/Dockerfile b/Dockerfile index 5cf2bf47a..2c33520ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,14 @@ RUN export PATH=$PATH:$GOPATH/bin && \ # The actual image FROM scratch -LABEL maintainer="maintainers@vikunja.io" + +LABEL org.opencontainers.image.authors='maintainers@vikunja.io' +LABEL org.opencontainers.image.url='https://vikunja.io' +LABEL org.opencontainers.image.documentation='https://vikunja.io/docs' +LABEL org.opencontainers.image.source='https://code.vikunja.io/vikunja' +LABEL org.opencontainers.image.licenses='AGPLv3' +LABEL org.opencontainers.image.title='Vikunja' + WORKDIR /app/vikunja ENTRYPOINT [ "/app/vikunja/vikunja" ] EXPOSE 3456 diff --git a/magefile.go b/magefile.go index c455f543d..20855c831 100644 --- a/magefile.go +++ b/magefile.go @@ -464,6 +464,26 @@ func (Build) Build() { runAndStreamOutput("go", "build", Goflags[0], "-tags", Tags, "-ldflags", "-s -w "+Ldflags, "-o", Executable) } +func (Build) SaveVersionToFile() error { + // Open the file for writing. If the file doesn't exist, create it. + // If it exists, truncate it. + file, err := os.Create("VERSION") + if err != nil { + return fmt.Errorf("error creating VERSION file: %w", err) + } + defer file.Close() + + // Write the version number to the file + _, err = file.WriteString(VersionNumber) + if err != nil { + return fmt.Errorf("error writing to VERSION file: %w", err) + } + + fmt.Println("Version number saved successfully to VERSION file") + + return nil +} + type Release mg.Namespace // Runs all steps in the right order to create release packages for various platforms