Merge pull request 'Embed licenses of used projects in final binary' (#109) from compiled-license into main
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: mentorenwahl/mentorenwahl#109
This commit is contained in:
commit
29949ca94f
|
@ -28,11 +28,12 @@ RUN rm -rf ./tmp_dist
|
|||
|
||||
FROM crystallang/crystal:1.3-alpine as builder
|
||||
ARG BUILD_ENV
|
||||
WORKDIR /src
|
||||
WORKDIR /src/mentorenwahl
|
||||
RUN apk add --no-cache pcre2-dev
|
||||
COPY --from=deps /app/shard.yml /app/shard.lock ./
|
||||
COPY --from=deps /app/lib ./lib
|
||||
COPY ./Makefile ./Makefile
|
||||
COPY ./LICENSE .
|
||||
COPY ./Makefile .
|
||||
COPY ./src ./src
|
||||
COPY --from=public-minify /src/dist ./public
|
||||
RUN if [ "${BUILD_ENV}" = "development" ]; then \
|
||||
|
@ -42,7 +43,7 @@ RUN if [ "${BUILD_ENV}" = "development" ]; then \
|
|||
fi
|
||||
|
||||
FROM scratch as runner
|
||||
COPY --from=builder /src/bin /bin
|
||||
COPY --from=builder /src/mentorenwahl/bin /bin
|
||||
EXPOSE 80
|
||||
ENTRYPOINT [ "backend" ]
|
||||
CMD [ "run" ]
|
||||
|
|
|
@ -52,6 +52,10 @@ shards:
|
|||
git: https://github.com/mrrooijen/commander.git
|
||||
version: 0.4.0
|
||||
|
||||
compiled_license:
|
||||
git: https://git.dergrimm.net/dergrimm/compiled_license.git
|
||||
version: 2.0.0
|
||||
|
||||
db:
|
||||
git: https://github.com/crystal-lang/crystal-db.git
|
||||
version: 0.11.0
|
||||
|
|
|
@ -67,3 +67,5 @@ dependencies:
|
|||
github: athena-framework/framework
|
||||
baked_file_system:
|
||||
github: schovi/baked_file_system
|
||||
compiled_license:
|
||||
git: https://git.dergrimm.net/dergrimm/compiled_license.git
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
require "commander"
|
||||
require "../backend"
|
||||
require "compiled_license"
|
||||
|
||||
Backend::Db.init
|
||||
|
||||
|
@ -48,12 +49,12 @@ cli = Commander::Command.new do |cmd|
|
|||
end
|
||||
|
||||
cmd.commands.add do |c|
|
||||
c.use = "license"
|
||||
c.short = "Prints license"
|
||||
c.use = "licenses"
|
||||
c.short = "Prints licenses of projects used by this programs"
|
||||
c.long = c.short
|
||||
|
||||
c.run do
|
||||
puts Backend::LICENSE
|
||||
puts CompiledLicense::LICENSES
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue