|
| 1 | +#!/bin/sh |
| 2 | +################################################################################### |
| 3 | +# Copyright (c) 2022 Wes Johnson |
| 4 | +# |
| 5 | +# This program and the accompanying materials are made available under the |
| 6 | +# terms of the Eclipse Public License 2.0 which is available at |
| 7 | +# http://www.eclipse.org/legal/epl-2.0. |
| 8 | +# |
| 9 | +# SPDX-License-Identifier: EPL-2.0 |
| 10 | +# |
| 11 | +# Contributors: |
| 12 | +# Ian Craggs - initial implementation in Python (package.py) |
| 13 | +# Wes Johnson - initial shell implementation derived from package.py |
| 14 | +################################################################################### |
| 15 | + |
| 16 | +FILES="build/coverage-report/coverage-sparkplug.html |
| 17 | +build/coverage-report/images/stickynote.png |
| 18 | +build/coverage-report/images/blank.png |
| 19 | +eftckl-v10 |
| 20 | +build/hivemq-extension/sparkplug-tck-3.0.0.zip |
| 21 | +build/hivemq-extension/sparkplug-tck-3.0.0.zip.sig |
| 22 | +hivemq-configuration/logback.xml |
| 23 | +hivemq-configuration/config.xml |
| 24 | +report.py |
| 25 | +UserGuide.html |
| 26 | +README.md |
| 27 | +README.html" |
| 28 | + |
| 29 | +ZIP_FILE_NAME=Eclipse-Sparkplug-TCK-3.0.0.zip |
| 30 | +PREFIX=build/SparkplugTCK/ |
| 31 | + |
| 32 | +# Delete the old version |
| 33 | +rm -f ${ZIP_FILE_NAME} |
| 34 | + |
| 35 | +# Update the UserGuide.html doc |
| 36 | +asciidoc UserGuide.adoc |
| 37 | + |
| 38 | +# Clean out and create the staging directory |
| 39 | +rm -fr ${PREFIX} |
| 40 | +mkdir ${PREFIX} |
| 41 | + |
| 42 | +# get the webconsole directory except the node_modules subdir |
| 43 | +WEBCONSOLE_FILES=`find webconsole | grep -v node_modules | grep -v layouts | grep -v dist | grep -v status | grep -v static | grep -v middleware | grep -v store | grep -v plugins | grep -v "\.nuxt" | grep -v "\.gitignore" | grep -v "\.editorconfig"` |
| 44 | + |
| 45 | +for FILE in $FILES ; do |
| 46 | + rsync -R $FILE ${PREFIX} |
| 47 | +done |
| 48 | + |
| 49 | +for FILE in $WEBCONSOLE_FILES ; do |
| 50 | + if [ x${FILE} == "xwebconsole" ] ; then |
| 51 | + continue |
| 52 | + fi |
| 53 | + |
| 54 | + rsync -R $FILE ${PREFIX} |
| 55 | +done |
| 56 | + |
| 57 | +BUILD_FILES=`ls -1 ${PREFIX}build` |
| 58 | +for FILE in $BUILD_FILES ; do |
| 59 | + mv ${PREFIX}build/$FILE ${PREFIX} |
| 60 | +done |
| 61 | +rmdir ${PREFIX}build |
| 62 | + |
| 63 | +cd build |
| 64 | +zip -r ../${ZIP_FILE_NAME} SparkplugTCK/ |
0 commit comments