fix(bin): 优化打包脚本
This commit is contained in:
@@ -4,7 +4,7 @@ jars_path=/data/datalake/jars
|
||||
jdk_path=/opt/jdk1.8.0_162/bin/java
|
||||
|
||||
arguments=$@
|
||||
# 手动上传jar包则注释掉这行,更显神通吧反正是
|
||||
# 手动上传jar包则注释掉这行,各显神通吧反正是
|
||||
curl http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.124:36800/file/download/service-cli-runner-1.0.0-SNAPSHOT.jar -o ${jars_path}/service-cli-runner.jar
|
||||
${jdk_path} -jar ${jars_path}/service-cli-runner.jar \
|
||||
--spring.profiles.active=b12 \
|
||||
|
||||
@@ -14,6 +14,12 @@ const upload_url = 'http://132.126.207.124:36800'
|
||||
const upload_username = 'AxhEbscwsJDbYMH2'
|
||||
const upload_password = 'cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4'
|
||||
|
||||
/**
|
||||
* 时间戳转自然语言
|
||||
*
|
||||
* @param timestamp 时间戳
|
||||
* @returns {string} 自然语言描述的时间
|
||||
*/
|
||||
const millisecondToString = (timestamp) => {
|
||||
const totalSeconds = Math.floor(parseFloat(timestamp) / 1000)
|
||||
if (isNaN(totalSeconds) || totalSeconds < 0) {
|
||||
@@ -91,8 +97,8 @@ const upload = async (file_path) => {
|
||||
throw response
|
||||
}
|
||||
console.log(`✅ Finished upload ${file_path} (${millisecondToString((new Date().getTime()) - start)})`)
|
||||
console.log(`📘 Uploaded ${fileSize(fs.statSync(file_path).size)}`)
|
||||
console.log(`📘 MD5 ${md5file.sync(file_path)}`)
|
||||
console.log(`📘 Uploaded ${fileSize(fs.statSync(file_path).size)}`)
|
||||
console.log(`📘 MD5 ${md5file.sync(file_path)}`)
|
||||
fs.rmSync(file_path)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
maven_setting=/Users/lanyuanxiaoyao/.m2/settings-nas.xml
|
||||
|
||||
build_profile=b2b12
|
||||
|
||||
upload_username=AxhEbscwsJDbYMH2
|
||||
upload_password=cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4
|
||||
upload_url=http://$upload_username:$upload_password@132.126.207.124:36800
|
||||
|
||||
root_path=$(dirname $(cd $(dirname $0);pwd))
|
||||
|
||||
function upload() {
|
||||
source_file_path=$(realpath $1)
|
||||
file_name=$(basename $source_file_path)
|
||||
echo "↪ Source md5: $(md5sum $source_file_path | awk '{print $1}')"
|
||||
echo "↪ Uploading $source_file_path"
|
||||
curl $upload_url/file/upload/$file_name -T $source_file_path
|
||||
echo "↪ Upload ytp success"
|
||||
echo "↪ Download: curl $upload_url/file/download/$file_name -o $file_name"
|
||||
echo "↪ Delete source"
|
||||
rm $source_file_path
|
||||
}
|
||||
|
||||
function joining {
|
||||
local d=${1-} f=${2-}
|
||||
if shift 2; then
|
||||
printf %s "$f" "${@/#/$d}"
|
||||
fi
|
||||
}
|
||||
|
||||
function deploy_root() {
|
||||
mvn deploy -N -D skipTests -s $maven_setting
|
||||
}
|
||||
|
||||
function deploy() {
|
||||
mvn -pl $(joining , $@) clean deploy -D skipTests -s $maven_setting
|
||||
}
|
||||
|
||||
function package() {
|
||||
mvn -pl $(joining , $@) clean package -D skipTests -P $build_profile -s $maven_setting
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import {fs} from 'zx'
|
||||
|
||||
let stats = fs.statSync('/Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-api');
|
||||
console.log(stats.ctime)
|
||||
console.log(stats.atime)
|
||||
console.log(stats.mtime)
|
||||
10
pom.xml
10
pom.xml
@@ -417,6 +417,16 @@
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-invoker-plugin</artifactId>
|
||||
<version>3.9.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user