0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-16 21:56:37 -05:00

feat(ui): if zui tag is not found for download, it now builds locally from the commit (#1318)

Signed-off-by: Ana-Roberta Lisca <ana.kagome@yahoo.com>
This commit is contained in:
Lisca Ana-Roberta 2023-03-30 13:15:48 +03:00 committed by GitHub
parent 5ad25126b7
commit b679cd2e98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -410,8 +410,23 @@ ui:
rm -rf ./pkg/extensions/build;\
cp -R $$tdir/zui/build ./pkg/extensions/;\
else\
curl -fsSL https://github.com/project-zot/zui/releases/download/$(ZUI_VERSION)/zui.tgz -o zui.tgz;\
tar xvzf zui.tgz -C ./pkg/extensions/;\
rm zui.tgz;\
curl --fail --head https://github.com/project-zot/zui/releases/download/$(ZUI_VERSION)/zui.tgz;\
if [ $$? -ne 0 ]; then\
pwd=$$(pwd);\
tdir=$$(mktemp -d);\
cd $$tdir;\
git clone --depth=1 --branch $(ZUI_VERSION) https://github.com/project-zot/zui.git;\
cd zui;\
git checkout $(ZUI_VERSION);\
npm install;\
npm run build;\
cd $$pwd;\
rm -rf ./pkg/extensions/build;\
cp -R $$tdir/zui/build ./pkg/extensions/;\
else\
curl -fsSL https://github.com/project-zot/zui/releases/download/$(ZUI_VERSION)/zui.tgz -o zui.tgz;\
tar xvzf zui.tgz -C ./pkg/extensions/;\
rm zui.tgz;\
fi;\
fi;\