diff options
author | Alexandre Flament <alex@al-f.net> | 2021-06-23 12:48:31 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-26 13:13:31 +0200 |
commit | 0606cde105859d9bdb751825bf89952297b335ed (patch) | |
tree | 1ebc6d08da9bdb242d0cda540179886d1312ad0a /Makefile | |
parent | 4b60c557a943622ad22bf819b1c81f7725830b99 (diff) | |
download | searxng-0606cde105859d9bdb751825bf89952297b335ed.tar.gz searxng-0606cde105859d9bdb751825bf89952297b335ed.zip |
[mod] add make targets to manage the build files in the /searx/static directory
The idea is to avoid conflict when there are differents branches with changes are made on the static files.
A solution is to ask the administrators to build the files from the sources, but it requires to install the npm dependencies.
So the solution in this commit keep the sources and the build files in the same git repository.
In one branch, the modification of the source (*.less, *.js) are commited without the built files.
The built files are commited in a uniq commit, with a commit message "Static build"
In case of merge or rebase, this commit can be dropped.
New make targets:
* static.build.commit.drop:
drop the last "Static build".
The command checks that there are only build files in the commit.
* static.build.commit :
call "make static.build.commit.drop"
call "make themes.all"
commit the files
* static.git.restore.staged:
git restore --staged <build files>
* static.git.restore:
git restore <build files>
Related to https://github.com/searxng/searxng/issues/137
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -3,6 +3,7 @@ .DEFAULT_GOAL=help export MTOOLS=./manage +export MSTATIC=./utils/manage_static.sh include utils/makefile.include @@ -89,6 +90,12 @@ PHONY += $(MANAGE) $(MANAGE): $(Q)$(MTOOLS) $@ + +MANAGE_STATIC += static.build.commit.drop static.build.commit static.git.restore.staged static.git.restore + +$(MANAGE_STATIC): + $(Q)$(MSTATIC) $@ + # deprecated PHONY += docs docs-clean docs-live docker themes |