Skip to content

Commit

Permalink
Merge pull request #34 from runwaylab/vendoring
Browse files Browse the repository at this point in the history
vendor
  • Loading branch information
GrantBirki authored Sep 25, 2024
2 parents 1d7cf1f + 5fc9acd commit 8c46d32
Show file tree
Hide file tree
Showing 987 changed files with 346 additions and 71,405 deletions.
1 change: 1 addition & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Metrics/CyclomaticComplexity:
# exclude all files in vendor/cache
Globs:
- "**/*.cr"
- "!vendor"
- "!lib"
2 changes: 1 addition & 1 deletion .crystal-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.1
1.13.2
16 changes: 12 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
docs/
.cache/
vendor/.cache/
vendor/shards/install/
.github/
bin/
assets/
coverage/
data/
LICENSE
Makefile
README.md
CONTRIBUTING.md
SECURITY.md
docker-compose.yml
docker-compose.override.yml
docker-compose.production.yml
tmp/
.ameba.yml
script/release
script/deploy
script/update
script/lint
script/format
script/acceptance
script/all
script/test
2 changes: 1 addition & 1 deletion .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
crystal: ${{ steps.crystal-version.outputs.crystal }}

- name: bootstrap
run: script/bootstrap
run: script/bootstrap --ci

- name: set directory permissions (for ci)
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
crystal: ${{ steps.crystal-version.outputs.crystal }}

- name: bootstrap
run: script/bootstrap
run: script/bootstrap --ci

- name: build
run: script/build
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
crystal: ${{ steps.crystal-version.outputs.crystal }}

- name: bootstrap
run: script/bootstrap
run: script/bootstrap --ci

- name: lint
run: script/lint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
crystal: ${{ steps.crystal-version.outputs.crystal }}

- name: bootstrap
run: script/bootstrap
run: script/bootstrap --ci

- name: fetch version
run: |
Expand All @@ -41,7 +41,7 @@ jobs:
- name: build (linux x86_64)
run: |
mkdir -p releases
script/build
script/build --production
mv ./bin/runway ./releases/runway-linux-x86_64
- name: generate artifact attestation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
crystal: ${{ steps.crystal-version.outputs.crystal }}

- name: bootstrap
run: script/bootstrap
run: script/bootstrap --ci

- name: test
run: script/test
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
.cache/shards/*
tmp/
bin/
!vendor/bin/
!vendor/darwin_arm64/bin/
!vendor/darwin_x86_64/bin/
!vendor/linux_x86_64/bin/
.shards/
*.dwarf
dist/

# do not ignore vendor/*/bin directories
!/vendor/*/bin/
vendor/shards/install
vendor/.cache

vendor/gems/

Expand Down
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ LABEL org.opencontainers.image.authors="Grant Birkinbine"
WORKDIR /app

# install build dependencies
RUN apt-get update && apt-get install libssh2-1-dev -y
RUN apt-get update && apt-get install libssh2-1-dev unzip wget -y

# install yq
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq

# copy core scripts
COPY script/preinstall script/preinstall
COPY script/update script/update
COPY script/bootstrap script/bootstrap
COPY script/postinstall script/postinstall
COPY script/ script/

# copy all vendored dependencies
COPY lib/ lib/
COPY vendor/shards/cache/ vendor/shards/cache/

# copy shard files
COPY shard.lock shard.lock
COPY shard.yml shard.yml

# bootstrap the project
RUN USE_LINUX_VENDOR=true script/bootstrap
RUN script/bootstrap --production

# copy all source files (ensure to use a .dockerignore file for efficient copying)
COPY . .

# build the project
RUN script/build
RUN script/build --production

# https://github.com/phusion/baseimage-docker
FROM ghcr.io/phusion/baseimage:noble-1.0.0
Expand Down
17 changes: 7 additions & 10 deletions acceptance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,29 @@ FROM 84codes/crystal:1.12.1-ubuntu-24.04 AS builder
WORKDIR /app

# install build dependencies
RUN apt-get update && apt-get install libssh2-1-dev -y
RUN apt-get update && apt-get install libssh2-1-dev unzip wget -y

# copy vendored dependencies
COPY vendor/linux_x86_64/bin/ vendor/linux_x86_64/bin/
# install yq
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq

# copy core scripts
COPY script/preinstall script/preinstall
COPY script/update script/update
COPY script/bootstrap script/bootstrap
COPY script/postinstall script/postinstall
COPY script/ script/

# copy all vendored dependencies
COPY lib/ lib/
COPY vendor/shards/cache/ vendor/shards/cache/

# copy shard files
COPY shard.lock shard.lock
COPY shard.yml shard.yml

# bootstrap the project
RUN USE_LINUX_VENDOR=true script/bootstrap
RUN script/bootstrap --production

# copy all source files (ensure to use a .dockerignore file for efficient copying)
COPY . .

# build the project
RUN script/build
RUN script/build --production

# https://github.com/phusion/baseimage-docker
FROM ghcr.io/phusion/baseimage:noble-1.0.0
Expand Down
42 changes: 0 additions & 42 deletions lib/.shards.info

This file was deleted.

7 changes: 0 additions & 7 deletions lib/ameba/.ameba.yml

This file was deleted.

4 changes: 0 additions & 4 deletions lib/ameba/.dockerignore

This file was deleted.

7 changes: 0 additions & 7 deletions lib/ameba/.editorconfig

This file was deleted.

9 changes: 0 additions & 9 deletions lib/ameba/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions lib/ameba/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions lib/ameba/LICENSE

This file was deleted.

34 changes: 0 additions & 34 deletions lib/ameba/Makefile

This file was deleted.

Loading

0 comments on commit 8c46d32

Please sign in to comment.