Commit a8651ba2 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

package and clean target updates

parent addbf5c4
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -52,15 +52,14 @@ package: install ## Construction d'une version distribuable de MaX
	fi
	@mkdir -p package
	@cp -rL .max package/.max
	@rm -rf package/.max/basex/webapp/max/bundles/*
# nettoyage du BaseX copié : suppression fichiers liées aux bundles, des données
	@rm package/.max/basex/.basex
	@rm package/.max/basex/webapp/max/*.xqm
	@rm -rf package/.max/basex/repo/max-*
	@find package/.max/basex/data/ -mindepth 1 -type d -exec rm -rf '{}' '+'
# copie des sources à la racine du .max
	@cp $(SRC_DIR)/main/webapp/routes.xqm package/.max/basex/webapp/max/
	@mkdir package/.max/src
	@cp -r src/main package/.max/src/
# copie des sources
	@cp -r $(SRC_DIR)/main/core package/.max/basex/webapp/max/
	@cp -r $(SRC_DIR)/main/bundles/max-dev package/.max/basex/webapp/max/bundles/
	@cp -r $(SRC_DIR)/main/bundles/max-export package/.max/basex/webapp/max/bundles/
# génération d'un fichier VERSION
	@git rev-parse HEAD >> package/VERSION
	@echo 'Package disponible dans le dossier package.'
@@ -118,7 +117,7 @@ clean: ## Supprime l'installation de MaX et les fichiers du projet
		rm -rf autoroute;\
		rm -rf locales;\
		rm config.xml;\
		rm -rf .max;\
		if [ ! -f VERSION ]; then rm -rf .max; fi;\
    else\
        echo "Opération annulée" ; \
    fi
@@ -143,6 +142,12 @@ init: check ## Initialisation à partir du fichier de configuration courant
	$(shell .max/basex/bin/basex -Q".max/resources/bundles-installer.xq")
.PHONY: init



add-bundle:
	@echo $(ADD_BUNDLE_ARGS)
.PHONY: add-bundle	

help: ## Affiche cette aide
	@echo "\nChoisissez une commande. Les choix sont:\n"
	@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "  \033[0;36m%-12s\033[m %s\n", $$1, $$2}'