Skip to content

Commit 55be5cd

Browse files
committed
feat(build): Add tooling to generate tarball of vendored crates
1 parent 4ff5c60 commit 55be5cd

5 files changed

Lines changed: 14 additions & 3 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ build/
5050
*.debug
5151
gh-pages
5252
sile-[0-9\.]*
53+
sile-vendored-crates-[0-9\.]*
5354
*.rockslock
5455
.dockerignore
5556
luacov.*.out
@@ -68,6 +69,7 @@ node_modules
6869
lua_modules
6970
lua_modules_dist
7071
package-lock.json
72+
vendor
7173

7274
# Editor entrails
7375
.vscode/

Makefile.am

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ force: ;
326326
PHONY_DEVELOPER_TARGETS = busted compare coverage \
327327
docker-dep-check docker-ghcr-to-hub docker-test-dist gource.webm lint luacheck luarocks-lint \
328328
prerelease regression_previews regressions release release-preview stylua typos tagrelease \
329-
test update_expecteds update_libtexpdf
329+
test update_expecteds update_libtexpdf vendored-crates
330330
.PHONY: $(PHONY_DEVELOPER_TARGETS)
331331

332332
if DEVELOPER_MODE
@@ -482,6 +482,11 @@ docker-test-dist: export DOCKER_TAG = dist-test
482482
docker-test-dist:
483483
./hooks/build $(VERSION)
484484

485+
vendored-crates: sile-vendored-crates-$(VERSION).tar.zst
486+
487+
sile-vendored-crates-$(VERSION).tar.zst: cargo-vendor
488+
tardir=vendor && $(am__tar) | $(ZSTD) -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} > $@
489+
485490
gource.webm:
486491
$(MKDIR_P) /tmp/gravatars
487492
magick documentation/sile-logo.pdf[0] -density 300 -colorspace RGB -negate -resize 50% /tmp/sile-logo.jpg

build-aux/que_rust_boilerplate.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $(_RUST_OUT) $(CARGO_BIN): $(@PACKAGE_VAR@_SOURCES) $(nodist_@PACKAGE_VAR@_SOURC
6161
$(CARGO_ENV) $(CARGO) build --target $(CARGO_TARGET_TRIPLE) --quiet --message-format=json $(CARGO_FEATURE_ARGS) $(CARGO_RELEASE_ARGS) | \
6262
$(JQ) -sr 'map(select(.reason == "build-script-executed")) | last | .out_dir' > $(_RUST_OUT)
6363

64-
RUST_DEVELOPER_TARGETS = cargo-test clippy rustfmt
64+
RUST_DEVELOPER_TARGETS = cargo-test clippy rustfmt cargo-vendor
6565
.PHONY: $(RUST_DEVELOPER_TARGETS)
6666

6767
if DEVELOPER_MODE
@@ -83,6 +83,9 @@ clean-cargo:
8383
cargo-test: $(PACKAGE_NAME)$(EXEEXT)
8484
$(CARGO_ENV) $(CARGO) $(CARGO_VERBOSE) test $(CARGO_FEATURE_ARGS) --locked
8585

86+
cargo-vendor:
87+
$(CARGO_ENV) $(CARGO) vendor --locked
88+
8689
else !DEVELOPER_MODE
8790

8891
$(RUST_DEVELOPER_TARGETS):

build-aux/sile_dist_checksums.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AC_DEFUN_ONCE([SILE_DIST_CHECKSUMS], [
66
77
AX_ADD_AM_MACRO([dnl
88
checksum_dist += \
9-
; \$(SHA256SUM) sile-\$(VERSION).pdf |\
9+
; \$(SHA256SUM) sile-\$(VERSION).pdf sile-vendored-crates-\$(VERSION).tar.zst |\
1010
\$(TEE) -a \$(distdir).sha256.txt
1111
])dnl
1212

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ AM_COND_IF([DEVELOPER_TOOLS], [
199199
AX_REQUIRE_PROG([tr])
200200
AX_REQUIRE_PROG([typos])
201201
AX_REQUIRE_PROG([xsltproc])
202+
AX_REQUIRE_PROG([zstd])
202203
])
203204

204205
AX_PROG_LUA([5.1], [], [], [], [prefer])

0 commit comments

Comments
 (0)