WIP
This commit is contained in:
@@ -11,14 +11,14 @@ export const subRepositoryClean = async (subRepoRelPath) => {
|
|||||||
const repo = `${process.env.JJ_WORKSPACE_DIR}/${subRepoRelPath}`
|
const repo = `${process.env.JJ_WORKSPACE_DIR}/${subRepoRelPath}`
|
||||||
logger.log(`clean repository ${repo} start`)
|
logger.log(`clean repository ${repo} start`)
|
||||||
const command = `
|
const command = `
|
||||||
pushd "${repo}" > /dev/null
|
cd ${repo}
|
||||||
|
|
||||||
git stash --include-untracked || true
|
git stash --include-untracked || true
|
||||||
git clean -f -X -e ".~envFormat" -e ".~jsonFormat" -e ".~shellFormat" || true
|
git clean -f -X -e ".~envFormat" -e ".~jsonFormat" -e ".~shellFormat" || true
|
||||||
git clean -f -x -e ".~envFormat" -e ".~jsonFormat" -e ".~shellFormat" || true
|
git clean -f -x -e ".~envFormat" -e ".~jsonFormat" -e ".~shellFormat" || true
|
||||||
git clean -xdf -e ".~envFormat" -e ".~jsonFormat" -e ".~shellFormat" || true
|
git clean -xdf -e ".~envFormat" -e ".~jsonFormat" -e ".~shellFormat" || true
|
||||||
git reset --hard || true
|
git reset --hard || true
|
||||||
|
|
||||||
popd > /dev/null
|
|
||||||
`
|
`
|
||||||
const res = await bashRunAndReturnSync({
|
const res = await bashRunAndReturnSync({
|
||||||
command: command
|
command: command
|
||||||
@@ -37,12 +37,11 @@ export const subRepositoryPull = async (subRepoRelPath, branch, noLogger = false
|
|||||||
logger.log(`pull repository ${repo} on ${branch} branch start`)
|
logger.log(`pull repository ${repo} on ${branch} branch start`)
|
||||||
}
|
}
|
||||||
const command = `
|
const command = `
|
||||||
pushd "${repo}" > /dev/null
|
cd "${repo}"
|
||||||
git checkout ${branch} || true
|
git checkout ${branch} || true
|
||||||
git config pull.rebase false --replace-all || true
|
git config pull.rebase false --replace-all || true
|
||||||
git pull origin || true
|
git pull origin || true
|
||||||
|
|
||||||
popd > /dev/null
|
|
||||||
`
|
`
|
||||||
const res = await bashRunAndReturnSync({
|
const res = await bashRunAndReturnSync({
|
||||||
command: command
|
command: command
|
||||||
@@ -65,7 +64,7 @@ export const subRepositoryPushChanges = async (subRepoRelPath, branch, commitMes
|
|||||||
await subRepositoryPull(subRepoRelPath, branch)
|
await subRepositoryPull(subRepoRelPath, branch)
|
||||||
await setTimeout(1000)
|
await setTimeout(1000)
|
||||||
const command = `
|
const command = `
|
||||||
pushd "${repo}" > /dev/null
|
cd "${repo}"
|
||||||
git status || true
|
git status || true
|
||||||
git add . || true
|
git add . || true
|
||||||
git status || true
|
git status || true
|
||||||
@@ -73,7 +72,6 @@ pushd "${repo}" > /dev/null
|
|||||||
git diff --cached --color | cat || true
|
git diff --cached --color | cat || true
|
||||||
git commit -m "${commitMessage}" || true
|
git commit -m "${commitMessage}" || true
|
||||||
git push origin || true
|
git push origin || true
|
||||||
popd > /dev/null
|
|
||||||
`
|
`
|
||||||
const res = await bashRunAndReturnSync({
|
const res = await bashRunAndReturnSync({
|
||||||
command: command,
|
command: command,
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@sarava-npm-packages/jj-command-line",
|
"name": "@sarava-npm-packages/jj-command-line",
|
||||||
"description": "jj cli",
|
"description": "jj cli",
|
||||||
"version": "2.1.8",
|
"version": "2.1.9",
|
||||||
"author": "Jason Jafari",
|
"author": "Jason Jafari",
|
||||||
"bin": {
|
"bin": {
|
||||||
"jj": "./jj.sh"
|
"jj": "./jj.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user