From 927a8d52e5bacad8d9d68bcc834e5e43df141ff3 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Mon, 30 Oct 2023 16:49:28 +0300 Subject: [PATCH] chore(build): Cleanup dist targets to be more ideomatic --- .github/workflows/release.yml | 4 ---- Makefile.am | 15 ++++++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8c2c61e..72cb0282 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,10 +29,6 @@ jobs: - name: Build source package run: | make dist - - name: Build release notes - if: github.repository == 'sile-typesetter/casile' && startsWith(github.ref, 'refs/tags/v') - run: | - make casile-${{ env.VERSION}}.md - name: Publish Release uses: softprops/action-gh-release@v1 if: github.repository == 'sile-typesetter/casile' && startsWith(github.ref, 'refs/tags/v') diff --git a/Makefile.am b/Makefile.am index f83f0768..bd3adedb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -108,7 +108,10 @@ CARGO_FEATURE_ARGS = --all-features clean-embedded-assets: [[ ! -e .git ]] || $(GIT) clean -dxf assets -dist-hook: +dist-hook: dist-hook-yarn + +.PHONY: dist-hook-yarn +dist-hook-yarn: $(YARN) install --production --frozen-lockfile --modules-folder "$(distdir)/node_modules" install-data-hook: @@ -128,6 +131,12 @@ node_modules: yarn.lock yarn.lock: package.json $(YARN) install +dist: casile-$(VERSION).md + +casile-%.md: CHANGELOG.md + $(SED) -e '/\.\.\.v$*/,/\.\.\.v/!d' $< | \ + $(SED) -e '1,3d;N;$$!P;$$!D;$$d' > $@ + PHONY_DEVELOPER_TARGETS = lint luacheck checkmake ruff tagrelease release-preview release docker docker-dep-check docker-ghcr-to-hub docker-build-push .PHONY: $(PHONY_DEVELOPER_TARGETS) @@ -160,10 +169,6 @@ release-preview: release: tagrelease -casile-%.md: CHANGELOG.md - $(SED) -e '/\.\.\.v$*/,/\.\.\.v/!d' $< | \ - $(SED) -e '1,3d;N;$$!P;$$!D;$$d' > $@ - export GHCR_REGISTRY ?= ghcr.io export GHCR_REPO ?= sile-typesetter/$(TRANSFORMED_PACKAGE_NAME)