Skip to content

Commit

Permalink
Allow setting crystal repository via env
Browse files Browse the repository at this point in the history
  • Loading branch information
caspiano committed Dec 21, 2022
1 parent 8b12d8c commit 39e55d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions darwin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ FORCE_GIT_TAGGED ?= 1 ## Require build to be based on git tag/branc
PREVIOUS_CRYSTAL_VERSION ?= ## Version of the bootstrap compiler
PREVIOUS_PACKAGE_ITERATION ?= 1## Package iteration of the bootstrap compiler

PREVIOUS_CRYSTAL_RELEASE_DARWIN_TARGZ ?= https://github.com/crystal-lang/crystal/releases/download/$(PREVIOUS_CRYSTAL_VERSION)/crystal-$(PREVIOUS_CRYSTAL_VERSION)-$(PREVIOUS_PACKAGE_ITERATION)-darwin-universal.tar.gz## Url to crystal-{version}-{package}-darwin-universal.tar.gz
CRYSTAL_REPOSITORY ?= crystal-lang/crystal

PREVIOUS_CRYSTAL_RELEASE_DARWIN_TARGZ ?= https://github.com/$(CRYSTAL_REPOSITORY)/releases/download/$(PREVIOUS_CRYSTAL_VERSION)/crystal-$(PREVIOUS_CRYSTAL_VERSION)-$(PREVIOUS_PACKAGE_ITERATION)-darwin-universal.tar.gz## Url to crystal-{version}-{package}-darwin-universal.tar.gz

OUTPUT_DIR = build

Expand Down Expand Up @@ -55,7 +57,7 @@ $(CURDIR)/../omnibus/crystal-darwin-x86_64/embedded/bin/crystal:
$(OUTPUT_DIR)/$(DARWIN_NAME) $(OUTPUT_DIR)/$(DARWIN_PKG_NAME): ## Build omnibus crystal project
ifeq ($(FORCE_GIT_TAGGED), 0)
rm -Rf $(CURDIR)/tmp && mkdir -p $(CURDIR)/tmp && cd $(CURDIR)/tmp \
&& git clone https://github.com/crystal-lang/crystal \
&& git clone https://github.com/$(CRYSTAL_REPOSITORY) \
&& cd crystal \
&& git checkout $(CRYSTAL_SHA1) \
&& git checkout -b $(CRYSTAL_VERSION)
Expand Down

0 comments on commit 39e55d6

Please sign in to comment.