Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit 1e0bca3

Browse files
committed
Update dependencies
1 parent 60b4c0f commit 1e0bca3

4 files changed

Lines changed: 789 additions & 374 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ darwin-*-template/
66
# build products:
77
out/
88

9-
109
# https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore
1110

1211
# Logs

Makefile

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# Based on https://github.com/cdzombak/nativefier-app-template
2+
13
SHELL:=/usr/bin/env bash
24

3-
VERSION=1.1.0
5+
VERSION=1.1.1
46
URL="https://lofi.cafe/"
57
define BUILD_FLAGS
68
-n "Lofi Cafe" \
@@ -17,37 +19,42 @@ define BUILD_FLAGS
1719
-i icon.icns
1820
endef
1921

22+
# Also define name below; you may want its name on the filesystem to differ:
23+
APPFILENAME="Lofi Cafe"
24+
2025
default: help
2126
# via https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
2227
.PHONY: help
2328
help:
2429
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
2530

2631
.PHONY: check-deps
27-
check-deps: ## Verify build dependencies are installed
32+
check-deps: ## Verify build-time dependencies are installed
2833
@command -v npm >/dev/null 2>&1 || echo "[!] Missing npm"
2934
@npm install
3035

36+
.PHONY: update-deps
37+
update-deps: check-deps ## Update the application's dependencies (eg. nativefier)
38+
npm update
39+
3140
.PHONY: clean
3241
clean: ## Clean build output directory
3342
rm -rf ./out
3443

3544
.PHONY: build
36-
build: clean check-deps ## Build app for the current platform
45+
build: clean check-deps update-deps ## Build app for the current platform
3746
mkdir -p ./out
3847
npm exec nativefier -- ${URL} ${BUILD_FLAGS} ./out
3948

49+
.PHONY: install-mac
50+
install-mac: build ## Build & install to /Applications (on macOS, Intel or Apple Silicon)
51+
cp -R "./out/${APPFILENAME}-darwin-x64/${APPFILENAME}.app" /Applications || cp -R "./out/${APPFILENAME}-darwin-arm64/${APPFILENAME}.app" /Applications
52+
rm -rf ./out
53+
4054
.PHONY: build-all
41-
build-all: clean check-deps ## Build app for many supported platforms
55+
build-all: clean check-deps ## Build app for supported platforms
4256
mkdir -p ./out
4357
npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p mac -a x64 ./out
44-
pushd "./out/Lofi Cafe-darwin-x64" && zip -r ../lofi-cafe-${VERSION}-macos-x64.zip "./Lofi Cafe.app" && popd
58+
pushd "./out/${APPFILENAME}-darwin-x64" && zip -r "../lofi-cafe-${VERSION}-macos-x64.zip" "./${APPFILENAME}.app" && popd
4559
npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p mac -a arm64 ./out
46-
pushd "./out/Lofi Cafe-darwin-arm64" && zip -r ../lofi-cafe-${VERSION}-macos-arm.zip "./Lofi Cafe.app" && popd
47-
# npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p windows -a x64 ./out/windows-x64
48-
# npm exec nativefier -- ${URL} ${BUILD_FLAGS} -p windows -a arm64 ./out/windows-arm
49-
50-
.PHONY: install-mac
51-
install-mac: build ## Build & install to /Applications (for macOS, x64 or arm)
52-
cp -R "./out/Lofi Cafe-darwin-x64/Lofi Cafe.app" /Applications || cp -R "./out/Lofi Cafe-darwin-arm64/Lofi Cafe.app" /Applications
53-
rm -rf ./out
60+
pushd "./out/${APPFILENAME}-darwin-arm64" && zip -r "../lofi-cafe-${VERSION}-macos-arm.zip" "./${APPFILENAME}.app" && popd

0 commit comments

Comments
 (0)