sales person report w/package breakdown, RT#22090
[freeside.git] / Makefile
1 #!/usr/bin/make
2
3 #solaris and perhaps other very weirdass /bin/sh
4 #SHELL="/bin/ksh"
5
6 DB_TYPE = Pg
7 #DB_TYPE = mysql
8
9 DB_USER = freeside
10 DB_PASSWORD=
11
12 DATASOURCE = DBI:${DB_TYPE}:dbname=freeside
13
14 #changable now (some things which should go to the others still go to CONF)
15 FREESIDE_CONF = /usr/local/etc/freeside
16 FREESIDE_LOG = /usr/local/etc/freeside
17 FREESIDE_LOCK = /usr/local/etc/freeside
18 FREESIDE_CACHE = /usr/local/etc/freeside
19 FREESIDE_EXPORT = /usr/local/etc/freeside
20
21 MASON_HANDLER = ${FREESIDE_CONF}/handler.pl
22 MASONDATA = ${FREESIDE_CACHE}/masondata
23
24 #where to put the default configuraiton used by freeside-setup to initialize
25 #a new database (not used after that).  primarily of interest to distro
26 #package maintainers
27 DIST_CONF = ${FREESIDE_CONF}/default_conf
28
29 #mod_perl v2 1.999_22 on Apache 2.0 through 2.3 (Debian ancient through 7.x)
30 #APACHE_VERSION=2
31 #Apache 2.4 (Debian 8.x)
32 APACHE_VERSION=2.4
33
34 #deb
35 FREESIDE_DOCUMENT_ROOT = /var/www/freeside
36 #redhat, fedora, mandrake
37 #FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside
38 #freebsd
39 #FREESIDE_DOCUMENT_ROOT = /usr/local/www/data/freeside
40 #openbsd
41 #FREESIDE_DOCUMENT_ROOT = /var/www/htdocs/freeside
42 #suse
43 #FREESIDE_DOCUMENT_ROOT = /srv/www/htdocs/freeside
44 #apache
45 #FREESIDE_DOCUMENT_ROOT = /usr/local/apache/htdocs/freeside
46
47 #deb, redhat, fedora, mandrake, suse, others?
48 INIT_FILE = /etc/init.d/freeside
49 #freebsd
50 #INIT_FILE = /usr/local/etc/rc.d/011.freeside.sh
51
52 #deb
53 INIT_INSTALL = PATH=$PATH:/sbin /usr/sbin/update-rc.d freeside defaults 23 01
54 #redhat, fedora
55 #INIT_INSTALL = /sbin/chkconfig freeside on
56 #not necessary (freebsd)
57 #INIT_INSTALL = /usr/bin/true
58
59 #deb, suse
60 #HTTPD_RESTART = /etc/init.d/apache restart
61 #deb w/apache2
62 HTTPD_RESTART = /etc/init.d/apache2 restart
63 #redhat, fedora, mandrake
64 #HTTPD_RESTART = /etc/init.d/httpd restart
65 #freebsd
66 #HTTPD_RESTART = /usr/local/etc/rc.d/apache.sh stop || true; sleep 10; /usr/local/etc/rc.d/apache.sh start
67 #openbsd
68 #HTTPD_RESTART = kill -TERM `cat /var/www/logs/httpd.pid`; sleep 10; /usr/sbin/httpd -u -DSSL
69 #apache
70 #HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
71
72 #(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf)
73 #debian unstable/8.0+, apache2.4
74 APACHE_CONF = /etc/apache2/conf-available
75 #deb (3.1+), apache2
76 #APACHE_CONF = /etc/apache2/conf.d
77
78 INSSERV_OVERRIDE = /etc/insserv/overrides
79
80 FREESIDE_RESTART = ${INIT_FILE} restart
81
82 #deb, redhat, fedora, mandrake, suse, others?
83 INSTALLGROUP = root
84 #freebsd, openbsd
85 #INSTALLGROUP = wheel
86
87 #edit the stuff below to have the daemons start
88
89 QUEUED_USER=fs_queue
90
91 SELFSERVICE_USER = fs_selfservice
92 #never run on the same machine in production!!!
93 SELFSERVICE_MACHINES = 
94 # SELFSERVICE_MACHINES = www.example.com
95 # SELFSERVICE_MACHINES = web1.example.com web2.example.com
96
97 #user with sudo access on SELFSERVICE_MACHINES for automated self-service
98 #installation.
99 SELFSERVICE_INSTALL_USER = ivan
100 SELFSERVICE_INSTALL_USERADD = /usr/sbin/useradd
101 #SELFSERVICE_INSTALL_USERADD = "/usr/sbin/pw useradd"
102
103 #RT_ENABLED = 0
104 RT_ENABLED = 1
105 RT_DOMAIN = example.com
106 RT_TIMEZONE = US/Pacific
107 #RT_TIMEZONE = US/Eastern
108 FREESIDE_URL = "http://localhost/freeside/"
109
110 #for now, same db as specified in DATASOURCE... eventually, otherwise?
111 RT_DB_DATABASE = freeside
112
113 TORRUS_ENABLED = 0
114
115 # for auto-version updates, so we can "make release" more things automatically
116 RPM_SPECFILE = rpm/freeside.spec
117
118 #---
119
120 #rt/config.layout.in
121 RT_PATH = /opt/rt3
122
123 #only used for dev kludge now, not a big deal
124 FREESIDE_PATH = `pwd`
125 PERL_INC_DEV_KLUDGE = /usr/local/share/perl/5.14.2/
126
127 VERSION := `grep '^$$VERSION' FS/FS.pm | cut -d\' -f2`
128 TAG := freeside_`grep '^$$VERSION' FS/FS.pm | cut -d\' -f2 | perl -pe 's/\./_/g'`
129
130 #DEBVERSION = `echo ${VERSION} | perl -pe 's/(\d)([a-z])/\1~\2/'`-1
131
132 TEXMFHOME := "\$$TEXMFHOME"
133
134 ver:
135         @echo "${VERSION}"
136
137 tag:
138         @echo "${TAG}"
139
140 help:
141         @echo "supported targets:"
142         @echo "                   create-database create-config"
143         @echo "                   install deploy"
144         @echo "                   configure-rt create-rt"
145         @echo "                   clean help"
146         @echo
147         @echo "                   install-docs install-perl-modules"
148         @echo "                   install-init install-apache"
149         @echo "                   install-rt install-texmf"
150         @echo "                   install-selfservice update-selfservice"
151         @echo
152         @echo "                   dev dev-docs dev-perl-modules"
153         @echo
154         @echo "                   masondocs alldocs docs"
155         @echo "                   wikiman"
156         @echo "                   perl-modules"
157         #@echo
158         #@echo "                   upload-docs release"
159
160
161 masondocs: httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/*
162         rm -rf masondocs
163         cp -pr httemplate masondocs
164         touch masondocs
165
166 alldocs: masondocs
167
168 docs:
169         make masondocs
170
171 wikiman:
172         chmod a+rx ./bin/pod2x
173         ./bin/pod2x
174
175 install-docs: docs
176         #ancient attempt to avoid overwriting customer modifications directly to production web files that's overlived its usefulness
177         #[ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true
178         #cp -r masondocs ${FREESIDE_DOCUMENT_ROOT}
179         [ -h ${FREESIDE_DOCUMENT_ROOT} ] && rm ${FREESIDE_DOCUMENT_ROOT} || true
180         mkdir -p ${FREESIDE_DOCUMENT_ROOT}
181         cp -r masondocs/* masondocs/.htaccess ${FREESIDE_DOCUMENT_ROOT}
182         chown -R freeside:freeside ${FREESIDE_DOCUMENT_ROOT}
183         install -D htetc/handler.pl ${MASON_HANDLER}
184         perl -p -i -e "\
185           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
186           s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
187         " ${MASON_HANDLER} || true
188         mkdir -p ${FREESIDE_EXPORT}/profile
189         chown freeside ${FREESIDE_EXPORT}/profile
190         [ ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true
191         chown -R freeside ${MASONDATA}
192
193 dev-docs:
194         [ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true
195         ln -s ${FREESIDE_PATH}/httemplate ${FREESIDE_DOCUMENT_ROOT}
196         cp htetc/handler.pl ${MASON_HANDLER}
197         perl -p -i -e "\
198           s'###use Module::Refresh;###'use Module::Refresh;'; \
199           s'###Module::Refresh->refresh;###'Module::Refresh->refresh;'; \
200           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
201           s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
202         " ${MASON_HANDLER} || true
203
204 perl-modules:
205         cd FS; \
206         [ -e Makefile ] || perl Makefile.PL; \
207         make; \
208         perl -p -i -e "\
209           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
210           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
211           s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
212           s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
213           s'%%%RT_PATH%%%'${RT_PATH}'g; \
214           s'%%%MASONDATA%%%'${MASONDATA}'g;\
215           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
216         " blib/lib/FS/*.pm;\
217         perl -p -i -e "\
218           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
219           s/%%%SELFSERVICE_MACHINES%%%/${SELFSERVICE_MACHINES}/g;\
220           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
221         " blib/lib/FS/Cron/*.pm;\
222         perl -p -i -e "\
223           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
224           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
225           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
226         " blib/lib/FS/part_export/*.pm;\
227         perl -p -i -e "\
228           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
229         " blib/lib/FS/cust_main/*.pm blib/lib/FS/cust_pkg/*.pm;\
230         perl -p -i -e "\
231           s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\
232           s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\
233           s|%%%FREESIDE_LOCK%%%|${FREESIDE_LOCK}|g;\
234           s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\
235           s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
236           s|%%%DIST_CONF%%%|${DIST_CONF}|g;\
237         " blib/script/*
238
239 install-perl-modules: perl-modules install-rt-initialdata
240         [ -L ${PERL_INC_DEV_KLUDGE}/FS ] \
241           && rm ${PERL_INC_DEV_KLUDGE}/FS \
242           && mv ${PERL_INC_DEV_KLUDGE}/FS.old ${PERL_INC_DEV_KLUDGE}/FS \
243           || true
244         cd FS; \
245         make install UNINST=1
246         #install this for freeside-setup
247         install -d $(DIST_CONF)
248         #install conf/[a-z]* $(DEFAULT_CONF)
249         #CVS is not [a-z]
250         install `ls -d conf/[a-z]* | grep -v CVS | grep -v '^conf/registries'` $(DIST_CONF)
251
252 dev-perl-modules: perl-modules
253         [ -d ${PERL_INC_DEV_KLUDGE}/FS -a ! -L ${PERL_INC_DEV_KLUDGE}/FS ] \
254           && mv ${PERL_INC_DEV_KLUDGE}/FS ${PERL_INC_DEV_KLUDGE}/FS.old \
255           || true
256
257         rm -rf ${PERL_INC_DEV_KLUDGE}/FS
258         ln -sf ${FREESIDE_PATH}/FS/blib/lib/FS ${PERL_INC_DEV_KLUDGE}/FS
259
260 install-texmf:  
261         install -D -o freeside -m 444 etc/longtable.sty \
262           /usr/local/share/texmf/tex/latex/longtable.sty
263         texhash /usr/local/share/texmf
264
265 install-init:
266         #[ -e ${INIT_FILE} ] || install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
267         install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE}
268         perl -p -i -e "\
269           s/%%%QUEUED_USER%%%/${QUEUED_USER}/g;\
270           s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\
271           s/%%%SELFSERVICE_MACHINES%%%/${SELFSERVICE_MACHINES}/g;\
272         " ${INIT_FILE}
273         ${INIT_INSTALL}
274
275 install-apache:
276         [ -e ${APACHE_CONF}/freeside-base.conf ] && rm ${APACHE_CONF}/freeside-base.conf || true
277         [ -d ${APACHE_CONF} ] && \
278           ( install -o root -m 755 htetc/freeside-base${APACHE_VERSION}.conf ${APACHE_CONF} && \
279             ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
280             ( [ ${TORRUS_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-torrus.conf ${APACHE_CONF} || true ) && \
281             perl -p -i -e "\
282               s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
283               s'%%%FREESIDE_CONF%%%'${FREESIDE_CONF}'g; \
284               s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
285             " ${APACHE_CONF}/freeside-*.conf \
286           ) || true
287         [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true
288         [ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
289         [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true
290         [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true
291
292 install-selfservice:
293         [ -e ~freeside ] || cp -pr /etc/skel ~freeside && chown -R freeside ~freeside
294         [ -e ~freeside/.ssh/id_dsa.pub ] || [ -e ~freeside/.ssh/id_rsa.pub ] || su - freeside -c 'ssh-keygen -t dsa'
295         for MACHINE in ${SELFSERVICE_MACHINES}; do \
296           scp -r fs_selfservice/FS-SelfService ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
297           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; perl Makefile.PL && make" ;\
298           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\
299           scp ~freeside/.ssh/id_dsa.pub ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\
300           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo ${SELFSERVICE_INSTALL_USERADD} freeside; sudo install -d -o freeside -m 755 ~freeside/.ssh/; sudo install -o freeside -m 600 ./id_dsa.pub ~freeside/.ssh/authorized_keys" ;\
301            ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo install -o freeside -d /usr/local/freeside" ;\
302         done
303
304 update-selfservice:
305         for MACHINE in ${SELFSERVICE_MACHINES}; do \
306           RSYNC_RSH=ssh rsync -rlptz fs_selfservice/FS-SelfService/ ${SELFSERVICE_INSTALL_USER}@$$MACHINE:FS-SelfService ;\
307           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; make clean; perl Makefile.PL && make" ;\
308           ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\
309         done
310
311 install-chown:
312         chown freeside "${FREESIDE_CACHE}/counters.${DATASOURCE}"
313         chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}"
314         chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}"
315
316 install: install-perl-modules install-docs install-init install-apache install-rt install-torrus install-texmf install-chown
317
318 deploy: install
319         ${HTTPD_RESTART}
320         ${FREESIDE_RESTART}
321
322 dev: dev-perl-modules dev-docs
323
324 create-database:
325         perl -e 'use DBIx::DataSource qw( create_database ); create_database( "${DATASOURCE}", "${DB_USER}", "${DB_PASSWORD}" ) or die $$DBIx::DataSource::errstr;'
326
327 create-config: install-perl-modules
328         [ -e ${FREESIDE_CONF} ] && mv ${FREESIDE_CONF} ${FREESIDE_CONF}.`date +%Y%m%d%H%M%S` || true
329         install -d -o freeside ${FREESIDE_CONF}
330
331         touch ${FREESIDE_CONF}/secrets
332         chown freeside ${FREESIDE_CONF}/secrets
333         chmod 600 ${FREESIDE_CONF}/secrets
334
335         /bin/echo -e "${DATASOURCE}\n${DB_USER}\n${DB_PASSWORD}" >${FREESIDE_CONF}/secrets
336         chmod 600 ${FREESIDE_CONF}/secrets
337         chown freeside ${FREESIDE_CONF}/secrets
338
339         mkdir "${FREESIDE_CACHE}/counters.${DATASOURCE}"
340         chown freeside "${FREESIDE_CACHE}/counters.${DATASOURCE}"
341
342         mkdir "${FREESIDE_CACHE}/cache.${DATASOURCE}"
343         chown freeside "${FREESIDE_CACHE}/cache.${DATASOURCE}"
344
345         mkdir "${FREESIDE_EXPORT}/export.${DATASOURCE}"
346         chown freeside "${FREESIDE_EXPORT}/export.${DATASOURCE}"
347
348         #install this for freeside-setup
349         install -d $(DIST_CONF)
350         #install conf/[a-z]* $(DEFAULT_CONF)
351         #CVS is not [a-z]
352         install `ls -d conf/[a-z]* | grep -v CVS | grep -v '^conf/registries'` $(DIST_CONF)
353
354
355 configure-rt:
356         cd rt; \
357         cp config.layout.in config.layout; \
358         perl -p -i -e "\
359           s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g;\
360           s'%%%MASONDATA%%%'${MASONDATA}'g;\
361         " config.layout; \
362         ./configure --enable-layout=Freeside\
363                     --with-db-type=${DB_TYPE} \
364                     --with-db-dba=${DB_USER} \
365                     --with-db-database=${RT_DB_DATABASE} \
366                     --with-db-rt-user=${DB_USER} \
367                     --with-db-rt-pass="${DB_PASSWORD}" \
368                     --with-web-user=freeside \
369                     --with-web-group=freeside \
370                     --with-rt-group=freeside \
371                     --with-web-handler=modperl2
372
373 create-rt: configure-rt
374         [ -d /opt           ] || mkdir /opt           #doh
375         [ -d /opt/rt3       ] || mkdir /opt/rt3       #
376         [ -d /opt/rt3/share ] || mkdir /opt/rt3/share #
377         cd rt; make install
378         rt/sbin/rt-setup-database --dba '${DB_USER}' \
379                                   --dba-password '${DB_PASSWORD}' \
380                                   --action schema \
381          || true
382         rt/sbin/rt-setup-database --dba-password '${DB_PASSWORD}' \
383                                   --action coredata \
384         && rt/sbin/rt-setup-database --dba-password '${DB_PASSWORD}' \
385                                      --action insert \
386                                      --datafile ${RT_PATH}/etc/initialdata \
387         || true
388
389 install-rt: 
390         if [ ${RT_ENABLED} -eq 1 ]; then ( cd rt; make install ); fi
391         if [ ${RT_ENABLED} -eq 1 ]; then perl -p -i -e "\
392           s'%%%RT_DOMAIN%%%'${RT_DOMAIN}'g;\
393           s'%%%RT_TIMEZONE%%%'${RT_TIMEZONE}'g;\
394           s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
395         " ${RT_PATH}/etc/RT_SiteConfig.pm; fi
396         if [ ${RT_ENABLED} -eq 1 ]; then \
397           chown -R freeside:freeside ${RT_PATH}/etc; fi
398
399 install-rt-initialdata:
400         if [ ${RT_ENABLED} -eq 1 ] && [ -d ${RT_PATH} ]; then \
401           chown -R freeside:freeside ${RT_PATH}/etc; \
402           install -D -o freeside -g freeside -m 0440 rt/etc/initialdata \
403           ${RT_PATH}/etc/initialdata; fi
404
405 configure-torrus:
406         cd torrus; \
407         torrus_user=freeside var_user=freeside var_group=freeside ./configure
408
409 install-torrus:
410         if [ ${TORRUS_ENABLED} -eq 1 ]; then ( cd torrus; \
411           make; \
412           make install; \
413           perl -p -i -e "\
414             s'%%%FREESIDE_URL%%%'${FREESIDE_URL}'g;\
415           " /usr/local/etc/torrus/conf/torrus-siteconfig.pl; \
416           torrus clearcache \
417         );fi
418
419 clean:
420         rm -rf masondocs
421         rm -rf httemplate/docs/man
422         rm -rf pod2htmi.tmp
423         rm -rf pod2htmd.tmp
424         -cd FS; \
425         make clean
426         -cd fs_selfservice/FS-SelfService; \
427         make clean
428
429 #these are probably only useful if you're me...
430
431 #release: upload-docs
432 .PHONY: release
433 release:
434         # Update the changelog
435         #./bin/cvs2cl
436         #cvs commit -m "Updated for ${VERSION}" ChangeLog
437
438         # Update the RPM specfile
439         #cvs edit ${RPM_SPECFILE}
440         #perl -p -i -e "s/\d+[^\}]+/${VERSION}/ if /%define\s+version\s+(\d+[^\}]+)\}/;" ${RPM_SPECFILE}
441         #perl -p -i -e "s/\d+[^\}]+/1/ if /%define\s+release\s+(\d+[^\}]+)\}/;" ${RPM_SPECFILE}
442         #cvs commit -m "Updated for ${VERSION}" ${RPM_SPECFILE}
443
444         # Update the Debian changelog
445         #cvs edit debian/changelog
446         #dch -v ${DEBVERSION} -p "New upstream release"
447         #cvs commit -m "Updated for ${VERSION}" debian/changelog
448
449         # Make sure other people's changes are pulled in!
450         git pull
451
452         # Tag the release
453         git tag -f ${TAG}
454
455         #cd /home/ivan
456         git archive --prefix=freeside-${VERSION}/ ${TAG} | gzip -9 >freeside-${VERSION}.tar.gz
457
458         scp freeside-${VERSION}.tar.gz ivan@420.am:/var/www/www.sisd.com/freeside/
459         mv freeside-${VERSION}.tar.gz ..
460
461         #these things failing should not make release target fail, so: "|| true"
462
463         #kick off vmware update
464         #./BUILD_VMWARE_APPLIANCE ${$TAG} || true
465
466         #kick off deb package update
467
468         #kick off rpm package update too?
469
470         #update web demo?
471
472         #update web demo self-service?
473