Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Excluding different files from release archives
- Loading branch information
1 parent
dca27e2
commit 3ef46c0
Showing
3 changed files
with
62 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.f12 export-ignore | ||
Makefile export-ignore | ||
README.md export-ignore | ||
TODO export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
SHELL=/bin/bash | ||
VERSION=1.9a1 | ||
NAME=nagvis-$(VERSION) | ||
|
||
help: | ||
@echo "This Makefile is meant to support development. Not useful for installing NagVis." | ||
@echo | ||
@echo " dist - Build the release archive" | ||
@echo " release - Build the archive, create tag and publish it" | ||
@echo " version - Update the version in all relevant files" | ||
@echo " update-copyright - Set copyright info to current year" | ||
@echo " doc-cleanup - Remove old "new in version X" notes from documentation" | ||
@echo | ||
|
||
dist: | ||
git archive --format=tar --prefix=$(NAME)/ HEAD | gzip > $(NAME).tar.gz | ||
|
||
create-tag: | ||
V=$(VERSION) ; if [ $${#V} -eq 3 ]; then \ | ||
TAG=nagvis-$$V.0 ; \ | ||
else \ | ||
TAG=nagvis-$$V ; \ | ||
fi ; \ | ||
git tag -a -m "Tag for NagVis $$V release" $$TAG ; \ | ||
git push origin --tags | ||
|
||
copy-to-archive: | ||
cp $(NAME).tar.gz /d1/lm/nagvis-tools/releases | ||
|
||
publish: | ||
rsync -av -e ssh $(NAME).tar.gz nagvis@nagvis.org:htdocs/share/ | ||
|
||
release: dist copy-to-archive create-tag publish | ||
|
||
version: | ||
@newversion=$$(dialog --stdout --inputbox "New Version:" 0 0 "$(VERSION)") ; \ | ||
if [ -n "$$newversion" ] ; then $(MAKE) NEW_VERSION=$$newversion setversion ; fi | ||
|
||
setversion: | ||
sed -ri 's/^(VERSION[[:space:]]*= *).*/\1'"$(NEW_VERSION)/" Makefile | ||
sed -i "s/.*CONST_VERSION.*/define('CONST_VERSION', '$(NEW_VERSION)');/g" share/server/core/defines/global.php | ||
MAJ_VERSION=$(NEW_VERSION) ; MAJ_VERSION=$${MAJ_VERSION::3} ; \ | ||
sed -i "s/<title>NagVis [^ ]*/<title>NagVis $$MAJ_VERSION/g" docs/*/index.html ; \ | ||
sed -i "s/<h1>NagVis [^ ]*/<h1>NagVis $$MAJ_VERSION/g" docs/*/welcome.html ; \ | ||
sed -i "s/: [0-9.]*\.x/: $$MAJ_VERSION.x/g" docs/*/welcome.html ; \ | ||
sed -i "s/>Version [^ ]*/>Version $$MAJ_VERSION/g" docs/*/toc.html | ||
|
||
update-copyright: | ||
for F in $$(find . -name *.php -o -name *.js -o -name \*.sh); do \ | ||
sed -i -r "s/Copyright \(c\) 2004-[0-9]{4} NagVis Project \(Contact: info@nagvis.org\)/Copyright (c) 2004-$$(date +%Y) NagVis Project (Contact: info@nagvis.org)/g" $$F ; \ | ||
done | ||
sed -i "s/Copyright © 2008-[0-9]*/Copyright \© 2008-$$(date +%Y)/g" docs/*/welcome.html | ||
|
||
doc-cleanup: | ||
find docs/* -name *.html -exec sed -ri \ | ||
's% ?\(?<font color="(#ff0000|red)">\(?(New|Neu|neu) in 1\.[567]\.?.?\)?:?</font>\)?%%g' {} \; |