40 lines
802 B
Makefile
40 lines
802 B
Makefile
|
|
#!/bin/sh
|
|
|
|
project=ems
|
|
|
|
# 文件路径
|
|
file="emsVersion"
|
|
|
|
# 获取当前时间
|
|
current_date=$(date "+%Y-%m-%d %H:%M:%S")
|
|
|
|
# 读取版本信息
|
|
version=$(grep "Version:" $file | awk '{print $3}')
|
|
|
|
# os platform
|
|
platform=ub22
|
|
|
|
# 更新文件内容
|
|
sed -i "s/Release Date:.*/Release Date: $current_date/" $file
|
|
|
|
# 输出版本信息和更新后的日期
|
|
echo "Version: $version"
|
|
echo "Release Date: $current_date"
|
|
|
|
build_root=build
|
|
|
|
build_dir=$(build)/$(project)-$(version)-$(platform)
|
|
|
|
svc_root=svc.ems
|
|
svc_bin=$(svc_root)/bin
|
|
|
|
package:
|
|
# mkdir -p $(build_dir)/bin
|
|
cp -rf $(svc_bin) $(build_dir)
|
|
# mkdir -p $(build_dir)/config
|
|
cp -rf $(build_root)/config $(build_dir)
|
|
cp -rf $(build_root)/data $(build_dir)
|
|
cp -rf $(build_root)/mssBak $(build_dir)
|
|
cp -rf $(build_root)/tools $(build_dir)
|
|
cp -f
|