mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
fix frontend build issue
This commit is contained in:
@@ -125,17 +125,16 @@ build_backend() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build_frontend() {
|
build_frontend() {
|
||||||
frontend_build_arguments="";
|
|
||||||
|
|
||||||
if [ "$RELEASE" = "0" ]; then
|
|
||||||
frontend_build_arguments="--buildUnixTime=$BUILD_UNIXTIME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Pulling frontend dependencies..."
|
echo "Pulling frontend dependencies..."
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
echo "Building frontend files ($RELEASE_TYPE)..."
|
echo "Building frontend files ($RELEASE_TYPE)..."
|
||||||
npm run build -- "$frontend_build_arguments"
|
|
||||||
|
if [ "$RELEASE" = "0" ]; then
|
||||||
|
buildUnixTime=$BUILD_UNIXTIME npm run build
|
||||||
|
else
|
||||||
|
npm run build
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
build_package() {
|
build_package() {
|
||||||
|
|||||||
+1
-13
@@ -14,19 +14,7 @@ const BUILD_DIR = resolve(__dirname, './dist',);
|
|||||||
|
|
||||||
export default defineConfig(async () => {
|
export default defineConfig(async () => {
|
||||||
const licenseContent = fs.readFileSync('./LICENSE', 'UTF-8');
|
const licenseContent = fs.readFileSync('./LICENSE', 'UTF-8');
|
||||||
let buildUnixTime = '';
|
let buildUnixTime = process.env.buildUnixTime || '';
|
||||||
|
|
||||||
for (let i = 0; i < process.argv.length; i++) {
|
|
||||||
if (process.argv[i].indexOf('--') !== 0) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const pairs = process.argv[i].split('=');
|
|
||||||
|
|
||||||
if (pairs[0] === '--buildUnixTime') {
|
|
||||||
buildUnixTime = pairs[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
root: SRC_DIR,
|
root: SRC_DIR,
|
||||||
|
|||||||
Reference in New Issue
Block a user