Skip to content

Commit

Permalink
[Luzifer#44] Fix missing libraries within compiles binary / container
Browse files Browse the repository at this point in the history
Signed-off-by: Knut Ahlers <knut@ahlers.me>
  • Loading branch information
Luzifer committed Sep 8, 2021
1 parent 6c6637e commit f38303d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .repo-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ image: "reporunner/golang-alpine"
checkout_dir: /go/src/github.com/Luzifer/ots

commands:
# Dependencies for downloading libraries
- apk add --update curl git make tar unzip
- make publish

environment:
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ COPY . /go/src/github.com/Luzifer/ots
WORKDIR /go/src/github.com/Luzifer/ots

RUN set -ex \
&& apk add --update git \
&& apk add --update \
curl \
git \
make \
tar \
unzip \
&& make download_libs \
&& go install \
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
-mod=readonly
Expand Down
24 changes: 11 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@
VER_BOOTSTRAP=4.3.1
VER_BOOTSWATCH=4.3.1
VER_FONTAWESOME=5.14.0
VER_GIBBERISH_AES=1.0.0
VER_JQUERY=3.4.1
VER_POPPER=1.15.0
VER_VUE=2.6.10
VER_VUE_I18N=8.12.0


default: generate
default: generate download_libs

generate: download_libs
generate:
docker run --rm -ti -v $(CURDIR):$(CURDIR) -w $(CURDIR)/src node:14-alpine \
sh -exc "npx npm@lts ci && npx npm@lts run build && chown -R $(shell id -u) ../frontend node_modules"

publish:
publish: download_libs
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
bash golang.sh

# -- Download / refresh external libraries --

clean_libs:
rm -rf frontend/css frontend/webfonts frontend/js

download_libs: clean_libs fontawesome
rm -rf \
frontend/css \
frontend/js \
frontend/openssl \
frontend/webfonts

download_libs: clean_libs
download_libs: fontawesome

fontawesome:
curl -sSfL https://github.com/FortAwesome/Font-Awesome/archive/$(VER_FONTAWESOME).tar.gz | \
Expand Down

0 comments on commit f38303d

Please sign in to comment.