Compare commits
11 Commits
f291a886e4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03a801ba7e | ||
|
|
5e5be31303 | ||
|
|
bee3f31df6 | ||
|
|
bbf355bd7f | ||
|
|
4be56530f0 | ||
|
|
75e7795452 | ||
|
|
2e6ecbebe1 | ||
|
|
8034b3dd38 | ||
|
|
f36f92d495 | ||
|
|
36cc26a41f | ||
|
|
d07de056e7 |
33
.gitignore
vendored
33
.gitignore
vendored
@@ -1,16 +1,42 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
# how to include another gitignore?
|
||||||
|
# https://stackoverflow.com/questions/7005142/can-i-include-other-gitignore-file-in-a-gitignore-file-like-include-in-c-li
|
||||||
|
# https://github.com/github/gitignore
|
||||||
|
# https://github.com/SlideWave/gitignore-include?tab=readme-ov-file#examples
|
||||||
|
# https://gitignore.io
|
||||||
|
|
||||||
### 目录 #################################################################
|
### .gitignore.global.txt ###
|
||||||
|
|
||||||
|
# Self defined pattern to ignore
|
||||||
|
?*.gitignore
|
||||||
|
?*.gitignore/
|
||||||
|
?*.gitignore.*
|
||||||
|
?*.gitignore.*/
|
||||||
|
*.gitomit
|
||||||
|
*.gitomit.*
|
||||||
|
*.gitomit/
|
||||||
|
*.gitomit.*/
|
||||||
|
*.nogit
|
||||||
|
*.nogit.*
|
||||||
|
*.nogit/
|
||||||
|
*.nogit.*/
|
||||||
|
# 保留
|
||||||
|
!.gitignore
|
||||||
|
!.gitignore.*
|
||||||
|
!.gitkeep
|
||||||
|
|
||||||
# 通用
|
# 通用
|
||||||
.svn/
|
.svn/
|
||||||
.deploy_git/
|
.deploy_git/
|
||||||
.idea/
|
.idea/
|
||||||
.sass-cache/
|
.sass-cache/
|
||||||
|
.wrangler
|
||||||
/test/unit/coverage/
|
/test/unit/coverage/
|
||||||
/test/e2e/reports/
|
/test/e2e/reports/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
*.aab
|
||||||
*.apk
|
*.apk
|
||||||
|
*.ipa
|
||||||
*.min.js
|
*.min.js
|
||||||
*.min.css
|
*.min.css
|
||||||
*.min.html
|
*.min.html
|
||||||
@@ -70,7 +96,6 @@ _desktop.ini
|
|||||||
/db.json
|
/db.json
|
||||||
|
|
||||||
# wo
|
# wo
|
||||||
envar-*.gitignore.js
|
|
||||||
# 服务端
|
# 服务端
|
||||||
/_archive/*
|
/_archive/*
|
||||||
/_datastore/*
|
/_datastore/*
|
||||||
@@ -84,5 +109,5 @@ envar-*.gitignore.js
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
pages4loader.json5
|
pages4loader.json5
|
||||||
|
|
||||||
# 保留
|
### .gitignore.local.txt ###
|
||||||
!.gitkeep
|
|
||||||
|
|||||||
23
deploy.js
23
deploy.js
@@ -41,8 +41,8 @@ const wo = (global.wo = {
|
|||||||
'Destination folder to deploy on the target.'
|
'Destination folder to deploy on the target.'
|
||||||
],
|
],
|
||||||
|
|
||||||
['repo', '-r, --repo <repo>', 'git repo address.'],
|
['repo', '-r, --repo <repo>', 'git repository address.'],
|
||||||
['branch', '-b, --branch <branch>', 'git repo branch.'],
|
['branch', '-b, --branch <branch>', 'git repository branch.'],
|
||||||
['gitname', '-n, --gitname <gitname>', 'git user name.'],
|
['gitname', '-n, --gitname <gitname>', 'git user name.'],
|
||||||
['gitemail', '-m, --gitemail <gitemail>', 'git user email.'],
|
['gitemail', '-m, --gitemail <gitemail>', 'git user email.'],
|
||||||
|
|
||||||
@@ -204,15 +204,17 @@ function deployToSsh (connection) {
|
|||||||
ssh.dispose()
|
ssh.dispose()
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(
|
console.error(
|
||||||
`🤷♀️🤷♀️🤷♀️ Failed deploy ${envarDeploy.fromPath} to ${connection.targetPath}/${connection.targetFolder} 🤷♀️🤷♀️🤷♀️`
|
new Date(),
|
||||||
|
`❌❌❌ Failed deploy ${envarDeploy.fromPath} to ${connection.targetPath}/${connection.targetFolder} ❌❌❌`
|
||||||
)
|
)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
} else {
|
} else {
|
||||||
console.info(
|
console.info(
|
||||||
`😊😊😊 Successfully deployed [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] 😊😊😊`
|
new Date(),
|
||||||
|
`✅✅✅ Successfully deployed [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] ✅✅✅`
|
||||||
)
|
)
|
||||||
if (connection.url) {
|
if (connection.url) {
|
||||||
console.info(`😊😊😊 ${connection.url} 😊😊😊`)
|
console.info(`✅✅✅ ${connection.url} ✅✅✅`)
|
||||||
}
|
}
|
||||||
process.exit()
|
process.exit()
|
||||||
}
|
}
|
||||||
@@ -221,7 +223,8 @@ function deployToSsh (connection) {
|
|||||||
console.error(err)
|
console.error(err)
|
||||||
ssh.dispose()
|
ssh.dispose()
|
||||||
console.error(
|
console.error(
|
||||||
`🤷♀️🤷♀️🤷♀️ Failed deploy [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] 🤷♀️🤷♀️🤷♀️`
|
new Date(),
|
||||||
|
`❌❌❌ Failed deploy [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] ❌`
|
||||||
)
|
)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
})
|
})
|
||||||
@@ -370,15 +373,17 @@ function deployToGit (connection) {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.info(
|
console.info(
|
||||||
`😊😊😊 Successfully deployed [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] 😊😊😊`
|
new Date(),
|
||||||
|
`✅✅✅ Deployed [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] ✅✅✅`
|
||||||
)
|
)
|
||||||
if (connection.url) {
|
if (connection.url) {
|
||||||
console.info(`😊😊😊 ${connection.url} 😊😊😊`)
|
console.info(new Date(), `✅✅✅ ${connection.url} ✅✅✅`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(
|
console.error(
|
||||||
`🤷♀️🤷♀️🤷♀️ Failed deploy [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] 🤷♀️🤷♀️🤷♀️`
|
new Date(),
|
||||||
|
`❌❌❌ Failed deploy [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] ❌❌❌`
|
||||||
)
|
)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.faronear.org/npm/wo-base-deployer"
|
"url": "https://git.tic.cc/open/wo-base-deployer"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"wo-base-envar": "git+https://git.faronear.org/npm/wo-base-envar",
|
"wo-base-envar": "git+https://git.tic.cc/open/wo-base-envar",
|
||||||
"bluebird": "^3.5.5",
|
"bluebird": "^3.5.5",
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"hexo-fs": "^3.1.0",
|
"hexo-fs": "^3.1.0",
|
||||||
|
|||||||
@@ -1,58 +1,84 @@
|
|||||||
# https://help.seafile.com/syncing_client/excluding_files/
|
# https://help.seafile.com/syncing_client/excluding_files/
|
||||||
# 注释。通配符:* 匹配0到若干个字符,包括代表目录的/。? 匹配1个字符,包括/。
|
# 注释。通配符:* 匹配0到若干个字符,包括代表目录的/。? 匹配1个字符,包括/。
|
||||||
# seafile-ignore.txt 只能控制在客户端需要忽略哪些文件。你依然可以在 seahub 的 web 界面创建这些被客户端忽略的文件。
|
# seafile-ignore.txt 只能控制在客户端需要忽略哪些文件。你依然可以在 seahub 的 web 界面创建这些被客户端忽略的文件。
|
||||||
# 在这种情况下,
|
# 在这种情况下,
|
||||||
# 这些文件会被同步到客户端,但是用户在客户端对这些文件的后续修改会被忽略,不会被同步回服务器。
|
# 这些文件会被同步到客户端,但是用户在客户端对这些文件的后续修改会被忽略,不会被同步回服务器。
|
||||||
# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。
|
# 文件在服务器端的后续更改会被同步到客户端,如果客户端也同时修改了这些文件,系统会生成冲突文件。
|
||||||
# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。
|
# seafile-ignore.txt 只能忽略还没有被同步的文件。对于已经被同步的文件,如果后来把它添加到 seafile-ignore.txt 中,系统只会忽略后续更改,已经上传的版本不会受影响。
|
||||||
|
|
||||||
# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步
|
### seafile-ignore.global.txt ###
|
||||||
*.sfignore
|
|
||||||
*.sfignore/
|
# 自定义的后缀名,凡有 sfignore 后缀的都不进行同步
|
||||||
|
*.sfignore
|
||||||
.DS_Store
|
*.sfignore/
|
||||||
*/.DS_Store
|
*.sfignore.*
|
||||||
|
*.sfignore.*/
|
||||||
.thumbnails
|
*.sfomit
|
||||||
*/.thumbnails
|
*.sfomit.*
|
||||||
|
*.sfomit/
|
||||||
Thumbs.db
|
*.sfomit.*/
|
||||||
*/Thumbs.db
|
*.nosf
|
||||||
thumbs.db
|
*.nosf.*
|
||||||
*/thumbs.db
|
*.nosf/
|
||||||
|
*.nosf.*/
|
||||||
_desktop.ini
|
|
||||||
*/_desktop.ini
|
## everything 'git pull or fetch' will update `.git/FETCH_HEAD`, even if the content doesn't change. To avoid too many useless updates of this file in Seafile history:
|
||||||
|
FETCH_HEAD
|
||||||
._*
|
*/FETCH_HEAD
|
||||||
*/._*
|
|
||||||
|
.Trash/
|
||||||
.$*
|
|
||||||
*/.$*
|
.DS_Store
|
||||||
|
*/.DS_Store
|
||||||
~$*
|
|
||||||
*/~$*
|
.thumbnails
|
||||||
|
*/.thumbnails
|
||||||
node_modules/
|
|
||||||
*/node_modules/
|
Thumbs.db
|
||||||
package-lock.json
|
*/Thumbs.db
|
||||||
|
thumbs.db
|
||||||
pages4loader.json5
|
*/thumbs.db
|
||||||
|
|
||||||
.svn/
|
_desktop.ini
|
||||||
*/.svn/
|
*/_desktop.ini
|
||||||
|
|
||||||
.deploy_git/
|
._*
|
||||||
*/.deploy_git/
|
*/._*
|
||||||
|
|
||||||
unpackage/dist/
|
.$*
|
||||||
*/unpackage/dist/
|
*/.$*
|
||||||
|
|
||||||
unpackage/release/
|
~$*
|
||||||
*/unpackage/release/
|
*/~$*
|
||||||
|
|
||||||
unpackage/cache/
|
node_modules/
|
||||||
*/unpackage/cache/
|
*/node_modules/
|
||||||
|
package-lock.json
|
||||||
Icon
|
*/package-lock.json
|
||||||
OneDrive/Icon
|
|
||||||
|
pages4loader.json5
|
||||||
|
*/pages4loader.json5
|
||||||
|
|
||||||
|
.deploy_git/
|
||||||
|
*/.deploy_git/
|
||||||
|
|
||||||
|
# next.js 项目
|
||||||
|
.next/
|
||||||
|
*/.next/
|
||||||
|
|
||||||
|
# HBuilder 目录
|
||||||
|
unpackage/
|
||||||
|
*/unpackage/
|
||||||
|
|
||||||
|
Icon
|
||||||
|
OneDrive/Icon
|
||||||
|
|
||||||
|
# wrangler project
|
||||||
|
|
||||||
|
.dev.vars*
|
||||||
|
*/.dev.vars*
|
||||||
|
.wrangler/
|
||||||
|
*/.wrangler/
|
||||||
|
|
||||||
|
### seafile-ignore.local.txt ###
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user