forked from CGCookie/retopoflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (45 loc) · 1.85 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ---------------------------------------------------------------
# Makefile for RetopoFlow
# Jonathan Williamson - <jonathan@cgcookie.com>
# Originally created by Diego Gangl - <diego@sinestesia.co>
# ---------------------------------------------------------------
# /./././././././././././././././././././././././././././././././
# SETTINGS
# /./././././././././././././././././././././././././././././././
# TODO: get version from options
# TODO: warn if profiling is enabled!
# see https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_6.html
NAME = RetopoFlow
VERSION = v3.00.2
GIT_TAG = "v3.00.2"
GIT_TAG_MESSAGE = "This is the official release for RetopoFlow 3.0.2."
BUILD_DIR = ../retopoflow_release
DEBUG_CLEANUP = $(NAME)/addon_common/scripts/strip_debugging.py
CGCOOKIE_BUILT = $(NAME)/.cgcookie
ZIP_FILE = $(NAME)_$(VERSION).zip
TGZ_FILE = $(NAME)_$(VERSION).tar.gz
.DEFAULT_GOAL := build
# /./././././././././././././././././././././././././././././././
# TARGETS
# /./././././././././././././././././././././././././././././././
clean:
rm -rf $(BUILD_DIR)
@echo "Release folder deleted"
gittag:
# create a new annotated (-a) tag and push to GitHub
git tag -a $(GIT_TAG) -m $(GIT_TAG_MESSAGE)
git push origin $(GIT_TAG)
build:
mkdir -p $(BUILD_DIR)
mkdir -p $(BUILD_DIR)/$(NAME)
# copy files over to build folder
# note: rsync flag -a == archive (same as -rlptgoD)
rsync -av --progress . $(BUILD_DIR)/$(NAME) --exclude-from="Makefile_excludes"
# touch file so that we know it was packaged by us
cd $(BUILD_DIR) && echo "This file indicates that CG Cookie built this version of RetopoFlow." > $(CGCOOKIE_BUILT)
# run debug cleanup
cd $(BUILD_DIR) && python3 $(DEBUG_CLEANUP) "YES!"
# zip it!
cd $(BUILD_DIR) && zip -r $(ZIP_FILE) $(NAME)
@echo
@echo $(NAME)" "$(VERSION)" is ready"