Skip to content

Commit

Permalink
ensure bootstrap.sh and houston-common build dep order
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaboud committed May 23, 2024
1 parent 79ee9a4 commit 621837e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,30 @@ NPM_UPDATE:=$(shell command -v yarn > /dev/null 2>&1 && echo 'yarn upgrade --cwd
VERSION_FILES:=$(addsuffix /src/version.js, $(PLUGIN_SRCS))
OS_PACKAGE_RELEASE?=built_from_source

BOOTSTRAP:=.yarnrc.yml

default: $(VERSION_FILES) $(OUTPUTS)

all: default

.PHONY: default all install clean help install-local install-remote install houston-common
.PHONY: default all install clean help install-local install-remote install houston-common bootstrap-yarn

$(BOOTSTRAP):
./bootstrap.sh
bootstrap-yarn: .yarnrc.yml

houston-common: houston-common/Makefile $(BOOTSTRAP)
$(MAKE) -C houston-common
.yarnrc.yml:
./bootstrap.sh

houston-common/Makefile:
git submodule update --init

houston-common: houston-common/Makefile bootstrap-yarn
$(MAKE) -C houston-common

$(VERSION_FILES): ./manifest.json
mkdir -p $(dir $@)
echo 'export const pluginVersion = "$(shell jq -r '.version' ./manifest.json)-$(shell jq -r '.buildVersion' ./manifest.json)$(OS_PACKAGE_RELEASE)";' > $@

# build outputs
.SECONDEXPANSION:
$(OUTPUTS): %/dist/index.html: houston-common $$(shell find '$$*' -type d \( -name node_modules -o -path '$$*/dist' -o -path '*node_modules*' \) -prune -o -type f -not \( -name .gitignore \) -print)
$(OUTPUTS): %/dist/index.html: bootstrap-yarn houston-common $$(shell find '$$*' -type d \( -name node_modules -o -path '$$*/dist' -o -path '*node_modules*' \) -prune -o -type f -not \( -name .gitignore \) -print)
@echo -e $(call cyantext,Building $*)
yarn --cwd $* install
ifeq ($(AUTO_UPGRADE_DEPS),1)
Expand Down
4 changes: 1 addition & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ set -x

command -v sponge >/dev/null || { echo "Missing 'sponge'. Please install moreutils." >&2 ; exit 1 ; }

git submodule update --init --recursive

jq 'del(.packageManager)' ./package.json | sponge ./package.json

rm .yarnrc.yml .yarn -rf

yarn set version stable

yarn config set nodeLinker node-modules
yarn config set nodeLinker node-modules
2 changes: 1 addition & 1 deletion packaging/focal/rules
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
dh $@ --no-parallel
dh $@


# dh_make generated override targets
Expand Down

0 comments on commit 621837e

Please sign in to comment.