aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred SUmner <jarred@jarredsumner.com> 2021-10-27 04:26:38 -0700
committerGravatar Jarred SUmner <jarred@jarredsumner.com> 2021-10-27 04:26:38 -0700
commitb81c895e1d0559f4ea550d6d37c82afab5a33d1a (patch)
treea25736c4df8c26ab29fa5fae9d95c97aad9b5b39
parentd434e5aeacd80a7bf6e3a4a7ccaa8ac1c9d6e07e (diff)
downloadbun-b81c895e1d0559f4ea550d6d37c82afab5a33d1a.tar.gz
bun-b81c895e1d0559f4ea550d6d37c82afab5a33d1a.tar.zst
bun-b81c895e1d0559f4ea550d6d37c82afab5a33d1a.zip
Add test that verifies installing bun with yarn & npm works before publishing
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 681ab3a3f..7853bfd86 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+SHELL := /bin/bash # Use bash syntax to be consistent
+
OS_NAME := $(shell uname -s | tr '[:upper:]' '[:lower:]')
ARCH_NAME_RAW := $(shell uname -m)
@@ -531,7 +533,6 @@ release-cli-check-yarn:
test $(PACKAGE_JSON_VERSION) == $(shell eval "cd /tmp/bun-cli-check-release; ./node_modules/.bin/bun --version || echo \"FAIL\"" )
release-cli-push:
-
gh release upload $(BUN_BUILD_TAG) --clobber $(BUN_DEPLOY_CLI)/bun-cli/bun-cli-$(PACKAGE_JSON_VERSION).tgz
npm publish $(BUN_DEPLOY_CLI)/bun-cli/bun-cli-$(PACKAGE_JSON_VERSION).tgz --access=public
@@ -580,14 +581,23 @@ release-mac: release-mac-without-push release-mac-push
release-bin-check:
rm -rf /tmp/bun-$(PACKAGE_JSON_VERSION)-check;
mkdir -p /tmp/bun-$(PACKAGE_JSON_VERSION)-check;
+ echo "{\"name\": \"bun-test-$(PACKAGE_JSON_VERSION)\"}" > /tmp/bun-$(PACKAGE_JSON_VERSION)-check/package.json
cd /tmp/bun-$(PACKAGE_JSON_VERSION)-check && npm install $(BUN_DEPLOY_TGZ)
- test $(PACKAGE_JSON_VERSION) == $(shell eval "/tmp/bun-$(PACKAGE_JSON_VERSION)-check/node_modules/.bin/bun --version")
+ test "$(PACKAGE_JSON_VERSION)" == "$(shell eval /tmp/bun-$(PACKAGE_JSON_VERSION)-check/node_modules/.bin/bun --version)"
+
+release-bin-check-yarn:
+ rm -rf /tmp/bun-$(PACKAGE_JSON_VERSION)-check;
+ mkdir -p /tmp/bun-$(PACKAGE_JSON_VERSION)-check;
+ echo "{\"name\": \"bun-test-$(PACKAGE_JSON_VERSION)\"}" > /tmp/bun-$(PACKAGE_JSON_VERSION)-check/package.json
+ cd /tmp/bun-$(PACKAGE_JSON_VERSION)-check && yarn add $(BUN_DEPLOY_TGZ)
+ test "$(PACKAGE_JSON_VERSION)" == "$(shell eval /tmp/bun-$(PACKAGE_JSON_VERSION)-check/node_modules/.bin/bun --version)"
release-mac-check:
rm -rf /tmp/bun-$(PACKAGE_JSON_VERSION)-check;
mkdir -p /tmp/bun-$(PACKAGE_JSON_VERSION)-check;
+ echo "{\"name\": \"bun-test-$(PACKAGE_JSON_VERSION)\"}" > /tmp/bun-$(PACKAGE_JSON_VERSION)-check/package.json
cd /tmp/bun-$(PACKAGE_JSON_VERSION)-check && npm install $(BUN_DEPLOY_TGZ_MAC)
- test $(PACKAGE_JSON_VERSION) == $(shell eval "/tmp/bun-$(PACKAGE_JSON_VERSION)-check/node_modules/.bin/bun --version")
+ test "$(PACKAGE_JSON_VERSION)" == "$(shell eval /tmp/bun-$(PACKAGE_JSON_VERSION)-check/node_modules/.bin/bun --version)"
release-bin-push:
gh release upload $(BUN_BUILD_TAG) --clobber $(BUN_DEPLOY_TGZ)