From 44d929c5b94a2352249323b3fb9428c20bfa60a0 Mon Sep 17 00:00:00 2001 From: Innei Date: Sat, 12 Mar 2022 12:32:59 +0800 Subject: [PATCH] Revert "chore: submodule" This reverts commit ab83f9265d4a524bc86929beb85c5ff00bb036a9. --- .gitignore | 1 + .gitmodules | 3 --- assets | 1 - dockerfile | 3 ++- package.json | 2 +- scripts/assets-push.sh | 7 ++++++- scripts/zip-asset.sh | 3 ++- 7 files changed, 12 insertions(+), 8 deletions(-) delete mode 100644 .gitmodules delete mode 160000 assets diff --git a/.gitignore b/.gitignore index 202e1217..caf740fc 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ release.zip run data +assets .env scripts/workflow/docker-compose.yml diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e3ac9fef..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "assets"] - path = assets - url = git@github.com:mx-space/assets.git diff --git a/assets b/assets deleted file mode 160000 index 76e070fe..00000000 --- a/assets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 76e070feab4f96449769a79d78bf4a2c6f4c8759 diff --git a/dockerfile b/dockerfile index 346b938a..b0ef0bfe 100644 --- a/dockerfile +++ b/dockerfile @@ -2,7 +2,8 @@ FROM node:16-alpine as builder WORKDIR /app COPY . . RUN apk add git make gcc g++ alpine-sdk python3 py3-pip python2 unzip -RUN git submodule update --init --recursive +RUN git clone https://github.com/mx-space/assets.git --depth=1 +RUN rm -rf assets/.git RUN npm i -g pnpm RUN pnpm install RUN pnpm bundle diff --git a/package.json b/package.json index 2b9b7cb2..2380af1d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "homepage": "https://github.com/mx-space/mx-server#readme", "issues": "https://github.com/mx-space/mx-server/issues", "scripts": { - "prepare": "husky install && git submodule update --init --recursive", + "prepare": "husky install", "prebuild": "rimraf dist", "build": "nest build", "dev": "NODE_PATH=`npm root --quiet -g` npm run start", diff --git a/scripts/assets-push.sh b/scripts/assets-push.sh index b17f5cfd..807c0f9c 100644 --- a/scripts/assets-push.sh +++ b/scripts/assets-push.sh @@ -1,4 +1,9 @@ + cd assets +git init git add . -git commit -m 'update assets' --amend +git commit -m 'update assets' +git remote add origin git@github.com:mx-space/assets.git +git branch -M master git push -u origin master -f +rm -rf .git \ No newline at end of file diff --git a/scripts/zip-asset.sh b/scripts/zip-asset.sh index 070325e8..65dd2e47 100644 --- a/scripts/zip-asset.sh +++ b/scripts/zip-asset.sh @@ -1,6 +1,7 @@ #!/bin/sh set -e -git submodule update --init --recursive +git clone https://github.com/mx-space/assets.git --depth=1 +rm -rf assets/.git cp -R assets out cp ecosystem.config.js out node scripts/download-latest-admin-assets.js