]> source.dussan.org Git - gitea.git/commitdiff
Fix release expansion issue (#15251)
authorzeripath <art27@cantab.net>
Fri, 2 Apr 2021 06:49:53 +0000 (07:49 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Apr 2021 06:49:53 +0000 (14:49 +0800)
* Fix release expansion issue

Fix #14578

Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix cache statement too

Signed-off-by: Andrew Thornton <art27@cantab.net>
* and update the npmrcs

Signed-off-by: Andrew Thornton <art27@cantab.net>
* as per @silverwind

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
.npmrc
Makefile
web_src/fomantic/.npmrc

diff --git a/.npmrc b/.npmrc
index c5ac9901c938cf5f1b21479f2dfa909dc731c8d4..25ed63413bbc49668896af09b447b4e9fa78a685 100644 (file)
--- a/.npmrc
+++ b/.npmrc
@@ -2,3 +2,4 @@ audit=false
 fund=false
 package-lock=true
 save-exact=true
+cache=.npm-cache
index d81f6a1d089cf7d930e0157bdbbc64048eb63717..c99483dec54f79936f5dd3c6a4b038ffba6d1d48 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -671,11 +671,11 @@ npm-cache: .npm-cache $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui
 
 .npm-cache: package-lock.json
        rm -rf .npm-cache
-       $(eval ESBUILD_VERSION := `node -p "require('./package-lock.json').dependencies.esbuild.version"`)
+       $(eval ESBUILD_VERSION := $(shell node -p "require('./package-lock.json').dependencies.esbuild.version"))
        npm config --userconfig=.npmrc set cache=.npm-cache
        rm -rf node_modules && npm install --no-save
        npm config --userconfig=$(FOMANTIC_WORK_DIR)/.npmrc set cache=../../.npm-cache
-       echo esbuild-{darwin-64,linux-{arm,arm64,32,64},windows-{32,64}}@$(ESBUILD_VERSION) | tr " " "\n" | xargs -n 1 -P 4 npm cache add
+       echo $(foreach build, darwin-64 $(foreach arch,arm arm64 32 64,linux-${arch}) $(foreach arch,32 64,windows-${arch}), esbuild-${build}@$(ESBUILD_VERSION)) | tr " " "\n" | xargs -n 1 -P 4 npm cache add
        rm -rf $(FOMANTIC_WORK_DIR)/node_modules
        @touch .npm-cache
 
index cc243d01b64fa5509e3f296f34d0a0c54cfbe928..5f8054bbb037c21b839637106f00e1f4f98aadb0 100644 (file)
@@ -1,2 +1,3 @@
 optional=false
 package-lock=false
+cache=../../.npm-cache