-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix release expansion issue #15251
Fix release expansion issue #15251
Conversation
Fix go-gitea#14578 Signed-off-by: Andrew Thornton <art27@cantab.net>
Better alternative for the $(eval ESBUILD_VERSION := $(shell node -p "require('./package-lock.json').dependencies.esbuild.version")) |
Got below to work. apparenly the diff --git a/.npmrc b/.npmrc
index c5ac9901c..25ed63413 100644
--- a/.npmrc
+++ b/.npmrc
@@ -1,4 +1,5 @@
audit=false
fund=false
package-lock=true
save-exact=true
+cache=.npm-cache
diff --git a/Makefile b/Makefile
index f2114b643..c99483dec 100644
--- a/Makefile
+++ b/Makefile
@@ -670,9 +670,9 @@ node_modules: package-lock.json
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 $(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
diff --git a/web_src/fomantic/.npmrc b/web_src/fomantic/.npmrc
index cc243d01b..5f8054bbb 100644
--- a/web_src/fomantic/.npmrc
+++ b/web_src/fomantic/.npmrc
@@ -1,2 +1,3 @@
optional=false
package-lock=false
+cache=../../.npm-cache |
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
lol I was just discovering this myself |
Co-authored-by: silverwind <me@silverwind.io>
Sorry, those Could you please revert this last commit @zeripath ? Thanks in advance. |
Can we somehow make those npm commands not write into the |
@CL-Jeremy just make another pr removing the .npm-cache files |
It's possible to make .npm-cache auto-detected for Makefile (i. e. run
Trying to implement this: https://stackoverflow.com/questions/16244969/how-to-tell-git-to-ignore-individual-lines-i-e-gitignore-for-specific-lines-of |
Out of question for me at least, I hate all kinds of pre-commit hooks. I think we should just keep it simple and go with #14578 (comment). Will probably follow up on that later today. |
Use native makefile foreach expansion instead of bash specific brace expansion
Fix #14578
Signed-off-by: Andrew Thornton art27@cantab.net