Abstract package uploading into a function
This commit is contained in:
parent
6ec65fb222
commit
8724c976fc
1 changed files with 24 additions and 59 deletions
83
GNUmakefile
83
GNUmakefile
|
@ -2,92 +2,57 @@ FILES := $(wildcard *.el)
|
||||||
|
|
||||||
PACKAGE_TARGETS := $(addprefix package-,$(FILES))
|
PACKAGE_TARGETS := $(addprefix package-,$(FILES))
|
||||||
|
|
||||||
|
define upload =
|
||||||
|
emacs --batch \
|
||||||
|
--load oni-package.el \
|
||||||
|
--funcall package-initialize \
|
||||||
|
--eval "(package-upload-file $1)"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define upload-multi-file =
|
||||||
|
$(call upload,(car (sort (file-expand-wildcards \"$1/dist/*.tar\") #'string>)))
|
||||||
|
cp $1/dist/$1-readme.txt bin/
|
||||||
|
endef
|
||||||
|
|
||||||
package: $(PACKAGE_TARGETS) package-oni-conf package-oni-css package-oni-elisp \
|
package: $(PACKAGE_TARGETS) package-oni-conf package-oni-css package-oni-elisp \
|
||||||
package-oni-haml package-oni-html package-oni-nxml package-oni-org \
|
package-oni-haml package-oni-html package-oni-nxml package-oni-org \
|
||||||
package-oni-php package-oni-python package-oni-ruby package-oni-twig
|
package-oni-php package-oni-python package-oni-ruby package-oni-twig
|
||||||
|
|
||||||
package-%: %
|
package-%: %
|
||||||
emacs --batch \
|
$(call upload,\"$^\")
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval '(package-upload-file "$^")'
|
|
||||||
|
|
||||||
package-oni-conf:
|
package-oni-conf:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-conf)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-conf/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-conf/dist/oni-conf-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-css:
|
package-oni-css:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-css)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-css/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-css/dist/oni-css-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-elisp:
|
package-oni-elisp:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-elisp)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-elisp/dist/*tar\") #'string>)))"
|
|
||||||
cp oni-elisp/dist/oni-elisp-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-haml:
|
package-oni-haml:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-haml)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-haml/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-haml/dist/oni-haml-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-html:
|
package-oni-html:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-html)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-html/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-html/dist/oni-html-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-nxml:
|
package-oni-nxml:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-nxml)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-nxml/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-nxml/dist/oni-nxml-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-org:
|
package-oni-org:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-org)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-org/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-org/dist/oni-org-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-php:
|
package-oni-php:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-php)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-php/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-php/dist/oni-php-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-python:
|
package-oni-python:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-python)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-python/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-python/dist/oni-python-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-ruby:
|
package-oni-ruby:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-ruby)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-ruby/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-ruby/dist/oni-ruby-readme.txt bin/
|
|
||||||
|
|
||||||
package-oni-twig:
|
package-oni-twig:
|
||||||
emacs --batch \
|
$(call upload-multi-file,oni-twig)
|
||||||
--load oni-package.el \
|
|
||||||
--funcall package-initialize \
|
|
||||||
--eval "(package-upload-file (car (sort (file-expand-wildcards \"oni-twig/dist/*.tar\") #'string>)))"
|
|
||||||
cp oni-twig/dist/oni-twig-readme.txt bin/
|
|
||||||
|
|
||||||
install-%:
|
install-%:
|
||||||
emacs --batch \
|
emacs --batch \
|
||||||
|
|
Loading…
Reference in a new issue