Commit de24624e authored by sumpfralle's avatar sumpfralle

r1054@erker: lars | 2010-06-30 09:55:14 +0200

 additionally support svk in Makefile


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@425 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent cb786cdc
# BEWARE: this makefile is solely used for preparing a release - it is not useful for compiling/installing the program # BEWARE: this makefile is solely used for preparing a release - it is not useful for compiling/installing the program
# use something like "VERSION=0.2 make" to override the VERSION on the command line # use something like "VERSION=0.2 make" to override the VERSION on the command line
VERSION ?= $(shell sed -n "s/^.*[\t ]*version[\t ]*=[\t ]*[\"']\([^\"']*\)[\"'].*/\1/gp" setup.py) VERSION ?= $(shell sed -n "s/^.*[\t ]*VERSION[\t ]*=[\t ]*[\"']\([^\"']*\)[\"'].*/\1/gp" src/pycam/__init__.py)
SVN_BASE ?= https://pycam.svn.sourceforge.net/svnroot/pycam SVN_REPO_BASE ?= $(shell svn info --xml 2>/dev/null | grep "^<url>" | cut -f 2 -d ">" | cut -f 1 -d "<")
SVK_REPO_BASE ?= $(shell LANG= svk info | grep "^Depot Path:" | cut -f 3- -d " ")
REPO_TAGS ?= https://pycam.svn.sourceforge.net/svnroot/pycam/tags
RELEASE_PREFIX ?= pycam- RELEASE_PREFIX ?= pycam-
ARCHIVE_DIR_RELATIVE ?= release-archives ARCHIVE_DIR_RELATIVE ?= release-archives
EXPORT_DIR = $(RELEASE_PREFIX)$(VERSION) TMP ?= /tmp
EXPORT_DIR = $(TMP)/$(RELEASE_PREFIX)$(VERSION)
EXPORT_FILE_PREFIX = $(EXPORT_DIR) EXPORT_FILE_PREFIX = $(EXPORT_DIR)
EXPORT_ZIP = $(EXPORT_FILE_PREFIX).zip EXPORT_ZIP = $(EXPORT_FILE_PREFIX).zip
EXPORT_TGZ = $(EXPORT_FILE_PREFIX).tar.gz EXPORT_TGZ = $(EXPORT_FILE_PREFIX).tar.gz
...@@ -24,7 +27,10 @@ clean: ...@@ -24,7 +27,10 @@ clean:
@rm -rf "$(EXPORT_DIR)" @rm -rf "$(EXPORT_DIR)"
svn_export: clean svn_export: clean
svn export --quiet "$(SVN_BASE)/trunk" "$(EXPORT_DIR)" @if svn info &>/dev/null;\
then svn export --quiet "$(SVN_REPO_BASE)" "$(EXPORT_DIR)";\
else svk co "$(SVK_REPO_BASE)" "$(EXPORT_DIR)";\
fi
create_archive_dir: create_archive_dir:
mkdir -p "$(ARCHIVE_DIR)" mkdir -p "$(ARCHIVE_DIR)"
...@@ -40,8 +46,8 @@ win32: create_archive_dir svn_export ...@@ -40,8 +46,8 @@ win32: create_archive_dir svn_export
cd "$(EXPORT_DIR)"; python setup.py bdist --format wininst --dist-dir "$(ARCHIVE_DIR)" cd "$(EXPORT_DIR)"; python setup.py bdist --format wininst --dist-dir "$(ARCHIVE_DIR)"
upload: upload:
svn cp "$(SVN_BASE)/trunk" "$(SVN_BASE)/tags/release-$(VERSION)" -m "tag release $(VERSION)" svn cp "$(SVN_REPO_BASE)" "$(REPO_TAGS)/release-$(VERSION)" -m "tag release $(VERSION)"
svn import "$(ARCHIVE_DIR)/$(EXPORT_ZIP)" "$(SVN_BASE)/tags/archives/$(EXPORT_ZIP)" -m "added released zip file for version $(VERSION)" svn import "$(ARCHIVE_DIR)/$(EXPORT_ZIP)" "$(REPO_TAGS)/archives/$(EXPORT_ZIP)" -m "added released zip file for version $(VERSION)"
svn import "$(ARCHIVE_DIR)/$(EXPORT_TGZ)" "$(SVN_BASE)/tags/archives/$(EXPORT_TGZ)" -m "added released tgz file for version $(VERSION)" svn import "$(ARCHIVE_DIR)/$(EXPORT_TGZ)" "$(REPO_TAGS)/archives/$(EXPORT_TGZ)" -m "added released tgz file for version $(VERSION)"
svn import "$(ARCHIVE_DIR)/$(EXPORT_WIN32)" "$(SVN_BASE)/tags/archives/$(EXPORT_WIN32)" -m "added released win32 installer for version $(VERSION)" svn import "$(ARCHIVE_DIR)/$(EXPORT_WIN32)" "$(REPO_TAGS)/archives/$(EXPORT_WIN32)" -m "added released win32 installer for version $(VERSION)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment