Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
A
amandaTest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amanda Chen
amandaTest
Commits
eab9c915
Commit
eab9c915
authored
Jun 23, 2022
by
Amanda Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
7fc0a8a5
90ffff5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
tag.js
tag.js
+11
-17
No files found.
tag.js
View file @
eab9c915
// require('shelljs/global'); 全局执行的shelljs
var
exec
=
require
(
"child_process"
).
exec
;
var
execSync
=
require
(
"child_process"
).
execSync
;
function
execute
(
cmd
)
{
exe
c
(
cmd
,
function
(
error
,
stdout
,
stderr
)
{
execSyn
c
(
cmd
,
function
(
error
,
stdout
,
stderr
)
{
if
(
error
)
{
console
.
error
(
error
);
console
.
error
(
"发生错误"
,
error
);
process
.
exit
(
1
);
// throw error;
}
else
{
console
.
log
(
"success"
);
console
.
log
(
cmd
);
}
});
}
var
arguments
=
process
.
argv
.
splice
(
2
);
console
.
log
(
"所传递的参数是:"
,
arguments
);
let
params
=
{
tag
:
null
||
"v-undefined-rc.1"
,
tag
:
null
,
m
:
null
||
"未知"
,
};
for
(
let
item
of
arguments
)
{
...
...
@@ -27,7 +26,9 @@ for (let item of arguments) {
}
}
}
console
.
log
(
"obj==="
,
params
);
if
(
!
params
.
tag
)
{
throw
"tag params is required!"
;
}
execute
(
"git checkout develop"
);
execute
(
"git pull"
);
...
...
@@ -36,11 +37,4 @@ execute("git merge --no-ff develop");
execute
(
"git push"
);
execute
(
`git tag -a
${
params
.
tag
}
-m
${
params
.
m
}
`
);
execute
(
`git push --tags `
);
// // 执行git提交命令
// shell.exec(`git checkout master`)
// shell.exec('git merge develop')
// // shell.exec(`git commit -m "${commit}"`)
// shell.exec(`git pull`)
// shell.exec('git push')
console
.
log
(
"还是走了"
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment