1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00

GO-4014 Fix infinite cycle

This commit is contained in:
Mikhail Iudin 2024-09-02 20:34:49 +02:00
parent 5fb0c26baa
commit 78e1a556bf
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
6 changed files with 26 additions and 23 deletions

View file

@ -339,7 +339,7 @@ endif
### Tantivy Section
REPO := anyproto/tantivy-go
VERSION := v0.0.9
VERSION := v0.1.0
OUTPUT_DIR := deps/libs
SHA_FILE = tantivity_sha256.txt
@ -363,7 +363,10 @@ define remove_arch
rm -f $(OUTPUT_DIR)/$(1)
endef
download-tantivy: $(TANTIVY_LIBS)
remove-libs:
@rm -rf deps/libs/*
download-tantivy: remove-libs $(TANTIVY_LIBS)
$(TANTIVY_LIBS):
@mkdir -p $(OUTPUT_DIR)/$(shell echo $@ | cut -d'.' -f1)
@ -371,20 +374,20 @@ $(TANTIVY_LIBS):
@tar -C $(OUTPUT_DIR)/$(shell echo $@ | cut -d'.' -f1) -xvzf $(OUTPUT_DIR)/$@
download-tantivy-all-force: download-tantivy
@rm -f $(SHA_FILE)
rm -f $(SHA_FILE)
@for file in $(TANTIVY_LIBS); do \
echo "SHA256 $(OUTPUT_DIR)/$$file" ; \
shasum -a 256 $(OUTPUT_DIR)/$$file | awk '{print $$1 " " "'$(OUTPUT_DIR)/$$file'" }' >> $(SHA_FILE); \
done
@rm -rf deps/libs/*.tar.gz
@echo "SHA256 checksums generated."
download-tantivy-all: download-tantivy
@rm -rf /deps/libs/*
@echo "Validating SHA256 checksums..."
@shasum -a 256 -c $(SHA_FILE) --status || { echo "Hash mismatch detected."; exit 1; }
@echo "All files are valid."
@rm -rf deps/libs/*.tar.gz
download-tantivy-local:
@rm -rf /deps/libs/*
download-tantivy-local: remove-libs
@mkdir -p $(OUTPUT_DIR)
@cp -r $(TANTIVY_GO_PATH)/libs/ $(OUTPUT_DIR)