2323# Load version information
2424include version
2525
26+ GIT_HASH_HEXIT_COUNT =10
27+
2628# Get git commit information
2729ifeq ($(BUILD_EDITION ) ,commercial)
28- GIT_VERSION =g$(shell git --git-dir=../.git rev-parse --short HEAD)
30+ GIT_VERSION =g$(shell git --git-dir=../.git rev-parse --short= $( GIT_HASH_HEXIT_COUNT ) HEAD)
2931else
30- GIT_VERSION =g$(shell git rev-parse --short HEAD)
32+ GIT_VERSION =g$(shell git rev-parse --short= $( GIT_HASH_HEXIT_COUNT ) HEAD)
3133endif
3234
3335# ###############################################################
@@ -80,7 +82,11 @@ else ifeq ($(BUILD_PLATFORM),linux-x86_64)
8082 LIVECODE = $(bin_dir ) /LiveCode-Community
8183 buildtool_platform = linux
8284 UPLOAD_ENABLE_CHECKSUM ?= yes
85+ ifeq ($(BUILD_EDITION ) ,commercial)
8386 UPLOAD_RELEASE_NOTES ?= yes
87+ else
88+ UPLOAD_RELEASE_NOTES ?= no
89+ endif
8490endif
8591
8692# FIXME add --warn-as-error
@@ -96,58 +102,23 @@ UPLOAD_SERVER ?= meg.on-rev.com
96102UPLOAD_PATH = staging/$(BUILD_LONG_VERSION ) /$(GIT_VERSION )
97103UPLOAD_MAX_RETRIES = 50
98104
99- ifeq ($(BUILD_EDITION ) ,commercial)
100- dist-docs : dist-docs-commercial
101- dist-docs : dist-guide-commercial
102- dist-notes : dist-notes-commercial
103- endif
104-
105- dist-docs : dist-docs-community
106- dist-docs : dist-guide-community
107- dist-notes : dist-notes-community
105+ dist-docs : dist-docs-api dist-docs-guide
108106
109- dist-docs-community :
107+ dist-docs-api :
110108 mkdir -p $(docs_build_dir )
111109 $(buildtool_command ) --platform $(buildtool_platform ) --stage docs \
112- --edition community \
113- --built-docs-dir $(docs_build_dir ) /cooked-community
110+ --built-docs-dir $(docs_build_dir )
114111
115- dist-docs-commercial :
116- mkdir -p $(docs_build_dir )
117- $(buildtool_command ) --platform $(buildtool_platform ) \
118- --stage docs --edition indy \
119- --built-docs-dir $(docs_build_dir ) /cooked-commercial
120- $(buildtool_command ) --platform $(buildtool_platform ) \
121- --stage docs --edition business \
122- --built-docs-dir $(docs_build_dir ) /cooked-commercial
123-
124- dist-notes-community :
112+ dist-notes :
125113 WKHTMLTOPDF=$(WKHTMLTOPDF ) \
126114 $(buildtool_command ) --platform $(buildtool_platform ) \
127115 --stage notes --warn-as-error \
128- --built-docs-dir $(docs_build_dir ) /cooked-community
116+ --built-docs-dir $(docs_build_dir )
129117
130- dist-notes-commercial :
118+ dist-docs-guide :
131119 WKHTMLTOPDF=$(WKHTMLTOPDF ) \
132120 $(buildtool_command ) --platform $(buildtool_platform ) \
133- --stage notes --warn-as-error \
134- --built-docs-dir $(docs_build_dir ) /cooked-commercial
135-
136- dist-guide-community :
137- WKHTMLTOPDF=$(WKHTMLTOPDF ) \
138- $(buildtool_command ) --platform $(buildtool_platform ) \
139- --edition community \
140- --stage guide --warn-as-error
141-
142- dist-guide-commercial :
143- WKHTMLTOPDF=$(WKHTMLTOPDF ) \
144- $(buildtool_command ) --platform $(buildtool_platform ) \
145- --edition indy \
146- --stage guide --warn-as-error
147- WKHTMLTOPDF=$(WKHTMLTOPDF ) \
148- $(buildtool_command ) --platform $(buildtool_platform ) \
149- --edition business \
150- --stage guide --warn-as-error
121+ --stage guide --warn-as-error
151122
152123ifeq ($(BUILD_EDITION ) ,commercial)
153124dist-server : dist-server-commercial
@@ -165,24 +136,28 @@ dist-server-commercial:
165136
166137ifeq ($(BUILD_EDITION ) ,commercial)
167138dist-tools : dist-tools-commercial
168- distmac-disk : distmac-disk-indy distmac-disk-business
139+ distmac-disk : distmac-disk-communityplus distmac-disk- indy distmac-disk-business
169140endif
170141
171142dist-tools : dist-tools-community dist-tools-version-check
172143distmac-disk : distmac-disk-community
173144
174145dist-tools-community :
175146 $(buildtool_command ) --platform mac --platform win --platform linux --stage tools --edition community \
176- --built-docs-dir $(docs_build_dir ) /cooked-community
147+ --built-docs-dir $(docs_build_dir )
177148dist-tools-commercial :
149+ $(buildtool_command ) --platform mac --platform win --platform linux --stage tools --edition communityplus \
150+ --built-docs-dir $(docs_build_dir )
178151 $(buildtool_command ) --platform mac --platform win --platform linux --stage tools --edition indy \
179- --built-docs-dir $(docs_build_dir ) /cooked-commercial
152+ --built-docs-dir $(docs_build_dir )
180153 $(buildtool_command ) --platform mac --platform win --platform linux --stage tools --edition business \
181- --built-docs-dir $(docs_build_dir ) /cooked-commercial
154+ --built-docs-dir $(docs_build_dir)
182155# Ensure that the version for which we're trying to build installers
183156# hasn't already been tagged.
184157dist-tools-version-check :
185- @if git rev-parse refs/tags/$(BUILD_SHORT_VERSION ) \
158+ @git tag -l | xargs git tag -d ; \
159+ git fetch --tags ; \
160+ if git rev-parse refs/tags/$( BUILD_SHORT_VERSION) \
186161 > /dev/null 2>&1 ; then \
187162 echo ; \
188163 echo " $( BUILD_SHORT_VERSION) has already been released." ; \
@@ -195,6 +170,8 @@ dist-tools-version-check:
195170
196171distmac-bundle-community :
197172 $(buildtool_command ) --platform mac --stage bundle --edition community
173+ distmac-bundle-communityplus :
174+ $(buildtool_command ) --platform mac --stage bundle --edition communityplus
198175distmac-bundle-indy :
199176 $(buildtool_command ) --platform mac --stage bundle --edition indy
200177distmac-bundle-business :
@@ -214,13 +191,27 @@ dist-upload-files.txt sha1sum.txt:
214191 -o -name ' LiveCode*Docs-*.zip' \
215192 -o -name ' *-bin.tar.xz' \
216193 -o -name ' *-bin.tar.bz2' \
217- > dist-upload-files.txt; \
194+ -o -name ' LiveCodeForFM-Mac-Solution.zip' \
195+ -o -name ' LiveCodeForFM-Mac-Plugin.zip' \
196+ -o -name ' LiveCodeForFM-Win-x86-Solution.zip' \
197+ -o -name ' LiveCodeForFM-Win-x86-Plugin.zip' \
198+ -o -name ' LiveCodeForFM-Win-x86_64-Solution.zip' \
199+ -o -name ' LiveCodeForFM-Win-x86_64-Plugin.zip' \
200+ -o -name ' LiveCodeForFM-All-Solutions.zip' \
201+ -o -name ' LiveCodeForFM-All-Plugins.zip' \
202+ -o -name ' LiveCodeForFM-Solution.zip' \
203+ -o -name ' LiveCodeForFM.zip' \
204+ > dist-upload-files.txt; \
218205 if test "${UPLOAD_RELEASE_NOTES}" = "yes"; then \
219206 find . -maxdepth 1 -name 'LiveCodeNotes*.pdf' >> dist-upload-files.txt; \
220- find . -maxdepth 1 -name ' LiveCodeNotes*.html' >> dist-upload-file; \
207+ find . -maxdepth 1 -name 'LiveCodeNotes*.html' >> dist-upload-files.txt; \
208+ find . -maxdepth 1 -name 'LiveCodeUpdates*.md' >> dist-upload-files.txt; \
209+ find . -maxdepth 1 -name 'LiveCodeUpdates*.html' >> dist-upload-files.txt; \
210+ find . -maxdepth 1 -name 'LiveCodeUserGuide*.html' >> dist-upload-files.txt; \
211+ find . -maxdepth 1 -name 'LiveCodeUserGuide*.pdf' >> dist-upload-files.txt; \
221212 fi; \
222213 if test "$(UPLOAD_ENABLE_CHECKSUM)" = "yes"; then \
223- $( SHA1SUM ) < dist-upload-files.txt > sha1sum.txt; \
214+ xargs --arg-file= dist-upload-files.txt $(SHA1SUM) > sha1sum.txt; \
224215 echo sha1sum.txt >> dist-upload-files.txt; \
225216 else \
226217 touch sha1sum.txt; \
@@ -253,11 +244,50 @@ dist-upload: dist-upload-files.txt dist-upload-mkdir
253244# resulting archive gets transferred to a Mac for signing and
254245# conversion to a DMG.
255246distmac-archive :
247+ set -e; \
256248 find . -maxdepth 1 -name ' LiveCode*Installer-*-Mac.app' -print0 \
257- | xargs -0 tar -Jcvf mac-installer.tar.xz
249+ | xargs -0 tar -cvf mac-installer.tar; \
250+ cd mac-bin; \
251+ find . -maxdepth 1 -name ' livecodeforfm-*.fmplugin' -print0 \
252+ | xargs -0 tar --append --file=../mac-installer.tar; \
253+ cd ..; \
254+ cd win-x86-bin; \
255+ find . -maxdepth 1 -name ' livecodeforfm-*.fmx' -print0 \
256+ | xargs -0 tar --append --file=../mac-installer.tar; \
257+ cd ..; \
258+ cd win-x86_64-bin; \
259+ find . -maxdepth 1 -name ' livecodeforfm-*.fmx64' -print0 \
260+ | xargs -0 tar --append --file=../mac-installer.tar; \
261+ cd ..; \
262+ bzip2 -c mac-installer.tar > mac-installer.tar.xz
258263
259264distmac-extract :
260- tar -xvf mac-installer.tar.xz
265+ set -e; \
266+ tar -xvf mac-installer.tar.xz; \
267+ cp -r ${private_dir} /filemaker/solutions/LiveCodeForFM.fmp12 . ; \
268+ $(buildtool_command ) --platform mac --stage fmpackage --debug; \
269+ $(buildtool_command ) --platform win-x86 --stage fmpackage --debug; \
270+ $(buildtool_command ) --platform win-x86_64 --stage fmpackage --debug; \
271+ $(buildtool_command ) --platform universal --stage fmpackage --debug; \
272+ find . -maxdepth 1 -name ' LiveCodeForFM-Mac-*.fmp12' -print0 \
273+ | xargs -0 zip -r LiveCodeForFM-Mac-Solution.zip; \
274+ find . -maxdepth 1 -name ' LiveCodeForFM-Win-x86-*.fmp12' -print0 \
275+ | xargs -0 zip -r LiveCodeForFM-Win-x86-Solution.zip; \
276+ find . -maxdepth 1 -name ' LiveCodeForFM-Win-x86_64-*.fmp12' -print0 \
277+ | xargs -0 zip -r LiveCodeForFM-Win-x86_64-Solution.zip; \
278+ find . -maxdepth 1 -name ' LiveCodeForFM-[1-9]*.fmp12' -print0 \
279+ | xargs -0 zip -r LiveCodeForFM.zip; \
280+ find . -maxdepth 1 -name ' livecodeforfm-*.*' -print0 \
281+ | xargs -0 zip -r LiveCodeForFM-All-Plugins.zip; \
282+ find . -maxdepth 1 -name ' livecodeforfm-*.fmplugin' -print0 \
283+ | xargs -0 zip -r LiveCodeForFM-Mac-Plugin.zip; \
284+ find . -maxdepth 1 -name ' livecodeforfm-*.fmx' -print0 \
285+ | xargs -0 zip -r LiveCodeForFM-Win-x86-Plugin.zip; \
286+ find . -maxdepth 1 -name ' livecodeforfm-*.fmx64' -print0 \
287+ | xargs -0 zip -r LiveCodeForFM-Win-x86_64-Plugin.zip; \
288+ find . -maxdepth 1 -name ' LiveCodeForFM.fmp12' -print0 \
289+ | xargs -0 zip -r LiveCodeForFM-Solution.zip
290+
261291
262292# Final installer creation for Mac
263293distmac-disk-% : distmac-bundle-%
0 commit comments