Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
devstack
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
devstack
Commits
ac9f76db
Commit
ac9f76db
authored
Sep 26, 2017
by
Brian Beggs
Committed by
Brian Beggs
Sep 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add repo status make target
parent
77d38119
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
+23
-1
Makefile
+3
-0
repo.sh
+20
-1
No files found.
Makefile
View file @
ac9f76db
...
@@ -32,6 +32,9 @@ dev.provision: | check-memory dev.provision.run stop ## Provision dev environmen
...
@@ -32,6 +32,9 @@ dev.provision: | check-memory dev.provision.run stop ## Provision dev environmen
dev.reset
:
| down dev.repo.reset pull dev.up static update-db
##
Attempts to reset the local devstack to a the master working state
dev.reset
:
| down dev.repo.reset pull dev.up static update-db
##
Attempts to reset the local devstack to a the master working state
dev.status
:
##
Prints the status of all git repositories
./repo.sh status
dev.repo.reset
:
##
Attempts to reset the local repo checkouts to the master working state
dev.repo.reset
:
##
Attempts to reset the local repo checkouts to the master working state
./repo.sh reset
./repo.sh reset
...
...
repo.sh
View file @
ac9f76db
...
@@ -59,7 +59,7 @@ reset ()
...
@@ -59,7 +59,7 @@ reset ()
name
=
"
${
BASH_REMATCH
[1]
}
"
name
=
"
${
BASH_REMATCH
[1]
}
"
if
[
-d
"
$name
"
]
;
then
if
[
-d
"
$name
"
]
;
then
cd
$name
;
git reset
--hard
HEAD
;
git checkout master
;
git pull
;
cd
"
$currDir
"
cd
$name
;
git reset
--hard
HEAD
;
git checkout master
;
git
reset
--hard
origin/master
;
git
pull
;
cd
"
$currDir
"
else
else
printf
"The [%s] repo is not cloned. Continuing.
\n
"
$name
printf
"The [%s] repo is not cloned. Continuing.
\n
"
$name
fi
fi
...
@@ -67,6 +67,23 @@ reset ()
...
@@ -67,6 +67,23 @@ reset ()
cd
- &> /dev/null
cd
- &> /dev/null
}
}
status
()
{
currDir
=
$(
pwd
)
for
repo
in
${
repos
[*]
}
do
[[
$repo
=
~
$name_pattern
]]
name
=
"
${
BASH_REMATCH
[1]
}
"
if
[
-d
"
$name
"
]
;
then
printf
"
\n
Git status for [%s]:
\n
"
$name
cd
$name
;
git status
;
cd
"
$currDir
"
else
printf
"The [%s] repo is not cloned. Continuing.
\n
"
$name
fi
done
cd
- &> /dev/null
}
if
[
"
$1
"
==
"clone"
]
;
then
if
[
"
$1
"
==
"clone"
]
;
then
clone
clone
...
@@ -75,4 +92,6 @@ elif [ "$1" == "reset" ]; then
...
@@ -75,4 +92,6 @@ elif [ "$1" == "reset" ]; then
if
[[
$REPLY
=
~ ^[Yy]
$
]]
;
then
if
[[
$REPLY
=
~ ^[Yy]
$
]]
;
then
reset
reset
fi
fi
elif
[
"
$1
"
==
"status"
]
;
then
status
fi
fi
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