Skip to content

Commit c425064

Browse files
committed
Upgrade Shards 0.10.0
1 parent 5bc7426 commit c425064

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

darwin/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ darwin-previous: $(CURDIR)/../omnibus/crystal-darwin-x86_64 ## download previous
4343
$(CURDIR)/../omnibus/crystal-darwin-x86_64:
4444
curl -L -o /tmp/crystal-darwin-x86_64.tar.gz $(PREVIOUS_CRYSTAL_RELEASE_DARWIN_TARGZ) \
4545
&& tar xfz /tmp/crystal-darwin-x86_64.tar.gz -O "crystal-*/embedded/bin/crystal" > $(CURDIR)/../omnibus/crystal-darwin-x86_64 \
46+
&& tar xfz /tmp/crystal-darwin-x86_64.tar.gz -O "crystal-*/embedded/bin/shards" > $(CURDIR)/../omnibus/shards-darwin-x86_64 \
4647
&& rm /tmp/crystal-darwin-x86_64.tar.gz \
47-
&& chmod +x $(CURDIR)/../omnibus/crystal-darwin-x86_64
48+
&& chmod +x $(CURDIR)/../omnibus/crystal-darwin-x86_64 \
49+
&& chmod +x $(CURDIR)/../omnibus/shards-darwin-x86_64
4850

4951
$(OUTPUT_DIR)/$(DARWIN_NAME) $(OUTPUT_DIR)/$(DARWIN_PKG_NAME): ## Build omnibus crystal project
5052
ifeq ($(FORCE_GIT_TAGGED), 0)

linux/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ ADD ${previous_crystal_release} /tmp/crystal.tar.gz
7373
ENV PATH=${PATH}:/tmp/crystal/lib/crystal/bin/
7474
RUN mkdir -p /tmp/crystal \
7575
&& tar xz -f /tmp/crystal.tar.gz -C /tmp/crystal --strip-component=1 \
76-
&& crystal --version
76+
&& crystal --version \
77+
&& shards --version
7778

7879
# Build crystal
7980
ARG crystal_version
@@ -93,11 +94,13 @@ ARG musl_target
9394
RUN git clone https://github.com/crystal-lang/shards \
9495
&& cd shards \
9596
&& git checkout ${shards_version} \
97+
&& shards install --production \
9698
\
9799
# Hack to make shards not segfault
98100
&& echo 'require "llvm/lib_llvm"; require "llvm/enums"; require "./src/shards"' > hack.cr \
99101
&& /crystal/bin/crystal build --stats --target ${musl_target} \
100-
hack.cr -o shards --static ${release:+--release}
102+
hack.cr -o shards --static ${release:+--release} \
103+
&& ([ "$(ldd shards | wc -l)" -eq "1" ] || { echo 'shards is not statically linked'; ldd shards; exit 1; })
101104

102105
COPY files/crystal-wrapper /output/bin/crystal
103106
COPY --from=debian /bdwgc/.libs/libgc.a /libgc-debian.a

linux/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ PACKAGE_MAINTAINER = Crystal Team <[email protected]>
1919
PREVIOUS_CRYSTAL_RELEASE_LINUX64_TARGZ ?= ## url to crystal-{version}-{package}-linux-x86_64.tar.gz
2020
PREVIOUS_CRYSTAL_RELEASE_LINUX32_TARGZ ?= ## url to crystal-{version}-{package}-linux-i686.tar.gz
2121

22-
SHARDS_VERSION = v0.8.1
22+
SHARDS_VERSION = v0.10.0
2323
GC_VERSION = v8.0.4
2424
LIBATOMIC_OPS_VERSION = v7.6.10
2525

omnibus/config/software/shards.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SHARDS_VERSION = "0.8.1"
1+
SHARDS_VERSION = "0.10.0"
22

33
name "shards"
44
default_version SHARDS_VERSION
@@ -18,12 +18,18 @@
1818
source md5: "f5b5108d798b1d86d2b9b45c3a2b5293"
1919
end
2020

21+
version "0.10.0" do
22+
source md5: "f982f2dc0c796763205bd0de68e9f87e"
23+
end
24+
2125
source url: "https://github.com/crystal-lang/shards/archive/v#{version}.tar.gz"
2226

2327
relative_path "shards-#{version}"
2428
env = with_standard_compiler_flags(with_embedded_path)
2529

2630
build do
31+
command "#{Dir.pwd}/shards-#{ohai['os']}-#{ohai['kernel']['machine']} install --production", env: env
32+
2733
command "#{install_dir}/bin/crystal" \
2834
" build" \
2935
" -o #{install_dir}/embedded/bin/shards" \

0 commit comments

Comments
 (0)