Skip to content

Commit

Permalink
build!: drop browser build and binary releases
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Apr 23, 2024
1 parent 6227760 commit c7b7b05
Show file tree
Hide file tree
Showing 33 changed files with 4 additions and 628,285 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ node_modules/
build-stamp
test-stamp
test/browser/test.js
test/benchmark/keybase.js

lib/
35 changes: 3 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
ICED=node_modules/.bin/iced
BUILD_STAMP=build-stamp
TEST_STAMP=test-stamp
UGLIFYJS=node_modules/.bin/uglifyjs
WD=`pwd`
BROWSERIFY=node_modules/.bin/browserify

default: build
Expand All @@ -11,8 +8,6 @@ all: build
lib/%.js: src/%.iced
$(ICED) -I browserify -c -o `dirname $@` $<

BROWSER=browser/kbpgp.js

$(BUILD_STAMP): \
lib/asymmetric.js \
lib/basekeypair.js \
Expand Down Expand Up @@ -94,40 +89,16 @@ build: $(BUILD_STAMP)
test-server: $(BUILD_STAMP)
$(ICED) test/run.iced

test-browser: $(TEST_STAMP) $(BUILD_STAMP)
@echo "Please visit in your favorite browser --> file://$(WD)/test/browser/index.html"

test/browser/test.js: test/browser/main.iced $(BUILD_STAMP)
$(BROWSERIFY) -i sodium -t icsify $< > $@

test/benchmark/keybase.js: bench/main.js $(BUILD_STAMP)
$(BROWSERIFY) -i sodium -s keybase $< > $@

$(TEST_STAMP): test/browser/test.js
date > $@

test: test-server test-browser

$(BROWSER): lib/main.js $(BUILD_STAMP)
$(BROWSERIFY) -i sodium -s kbpgp $< > $@
test: test-server

release: $(BROWSER)
V=`jq -r .version package.json` ; \
cp $< rel/kbpgp-$$V.js ; \
$(UGLIFYJS) -c < rel/kbpgp-$$V.js > rel/kbpgp-$$V-min.js ; \
rm -rf rel/kbpgp-$$V-signed-release.zip ; \
rm -rf rel/kbpgp ; \
mkdir rel/kbpgp ; \
cp rel/kbpgp-$$V.js rel/kbpgp/ ; \
cp rel/kbpgp-$$V-min.js rel/kbpgp/ ; \
pushd rel/ ; \
popd ; \
rm -rf rel/kbpgp

clean:
rm -rf lib/* $(BUILD_STAMP) $(TEST_STAMP) test/browser/test.js
rm -rf lib/* $(BUILD_STAMP)

setup:
pnpm install

.PHONY: clean setup test test-browser
.PHONY: clean setup test
Loading

0 comments on commit c7b7b05

Please sign in to comment.