Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
e34b384c
Commit
e34b384c
authored
Oct 18, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update script
parent
2b6d5ff5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
python/main.py
+4
-0
python/shell.py
+15
-2
No files found.
python/main.py
View file @
e34b384c
...
...
@@ -27,6 +27,7 @@ print("12、马甲包切换")
print
(
"13、打印checklist"
)
print
(
"14、生成隐协议文件"
)
print
(
"15、刷新本地协议"
)
print
(
"21、reset project"
)
command
=
int
(
input
(
"请输入指令编号:"
))
...
...
@@ -77,3 +78,6 @@ elif command == 14:
elif
command
==
15
:
Function
.
update_local_privacy
(
config
)
elif
command
==
21
:
Shell
.
reset_project
(
config
)
python/shell.py
View file @
e34b384c
...
...
@@ -86,4 +86,18 @@ class Shell:
commit_id
=
input
(
"输入commit id: "
)
os
.
system
(
"git reset --hard
%
s"
%
commit_id
)
print
(
" "
)
\ No newline at end of file
#reset project
@staticmethod
def
reset_project
(
config
):
command
=
"
%
s
\n
%
s
\n
%
s
\n
%
s
\n
%
s
\n
"
\
%
(
"cd
%
s"
%
config
[
'root'
],
"git checkout . && git clean -df"
,
"cd lib_base || { echo
\"
lib_base not exist!
\"
; exit 1; }"
,
"git checkout . && git clean -df"
,
"git reset --hard origin/master"
,
)
os
.
system
(
command
)
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