Skip to content

Commit

Permalink
Merge pull request #115 from fengzeroz/main
Browse files Browse the repository at this point in the history
remove ui
  • Loading branch information
fengzeroz authored Nov 1, 2023
2 parents 7aa5a74 + 564cc2b commit 4c51f01
Showing 1 changed file with 6 additions and 43 deletions.
49 changes: 6 additions & 43 deletions cross-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,19 @@ home=/home/neuron
branch=main
vendor=?
arch=?
ui_version=?
version=?
ui_path=https://github.com/emqx/neuron-dashboard/releases/download
language=cn

while getopts ":a:v:o:u:l:i:" OPT; do
while getopts ":a:v:o:l:" OPT; do
case ${OPT} in
a)
arch=$OPTARG
;;
o)
vendor=$OPTARG
;;
v)
version=$OPTARG
;;
u)
ui_path=$OPTARG
;;
i)
ui_version=$OPTARG
;;
l)
language=$OPTARG
;;
v)
version=$OPTARG
;;
esac
done

Expand All @@ -40,23 +28,6 @@ package_dir=$home/$branch/Program/$vendor/package/neuron
library=$home/$branch/libs/$vendor
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"

function download_ui() {
cd $package_dir

case $language in
(cn)
wget $ui_path/$ui_version/neuron-dashboard.zip;

unzip neuron-dashboard.zip;
rm -rf neuron-dashboard.zip;;
(en)
wget $ui_path/$ui_version/neuron-dashboard-en.zip;

unzip neuron-dashboard-en.zip;
rm -rf neuron-dashboard-en.zip;;
esac
}


rm -rf $package_dir

Expand All @@ -73,8 +44,6 @@ cp .gitkeep $package_dir/logs/
cp .gitkeep $package_dir/persistence/
cp .gitkeep $package_dir/certs/

download_ui

cp $neuron_dir/LICENSE $package_dir/config
cp $neuron_modules_dir/config/protobuf-LICENSE $package_dir/config/
cp $neuron_modules_dir/config/protobuf-c-LICENSE $package_dir/config/
Expand Down Expand Up @@ -164,11 +133,5 @@ cp $neuron_modules_dir/build/simulator/opcua_simulator \
cd $package_dir/..
rm -rf neuron*.tar.gz

case $language in
(cn)
tar czf neuron-$version-linux-$arch.tar.gz neuron
echo "neuron-$version-linux-$arch.tar.gz";;
(en)
tar czf neuron-$version-linux-$arch-en.tar.gz neuron
echo "neuron-$version-linux-$arch-en.tar.gz";;
esac
tar czf neuron-$version-linux-$arch.tar.gz neuron
echo "neuron-$version-linux-$arch.tar.gz";;

0 comments on commit 4c51f01

Please sign in to comment.