Navigation Menu

Skip to content

Commit

Permalink
Excluding different files from release archives
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsMichelsen committed Mar 8, 2015
1 parent dca27e2 commit 3ef46c0
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 33 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
@@ -0,0 +1,6 @@
.gitattributes export-ignore
.gitignore export-ignore
.f12 export-ignore
Makefile export-ignore
README.md export-ignore
TODO export-ignore
56 changes: 56 additions & 0 deletions Makefile
@@ -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 &copy; 2008-[0-9]*/Copyright \&copy; 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' {} \;
33 changes: 0 additions & 33 deletions pack

This file was deleted.

0 comments on commit 3ef46c0

Please sign in to comment.