Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
124
Merge Requests
15
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds
Commits
eb1805a5
Commit
eb1805a5
authored
1 minute ago
by
Emiliano Balbuena
Browse files
Options
Download
(fix): Better init (clone) scripts
parent
dff75375
chore/local-infra-tweaks
1 merge request
!175
WIP: Local stack tweaks
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
19 deletions
+32
-19
init.ps1
View file @
eb1805a5
param
(
[
CmdletBinding
()]
Param
(
[
switch
]
$Ssh
)
Set-StrictMode
-Version
latest
$Error
ActionPreference
=
"Stop"
Push-Location
$PSScriptRoot
try
{
function
Exec
{
[
CmdletBinding
()]
param
(
[
Parameter
(
Position
=
0
,
Mandatory
=
1
)][
scriptblock
]
$cmd
,
[
Parameter
(
Position
=
1
,
Mandatory
=
0
)][
string
]
$errorMessage
=
(
"Error executing command {0}"
-f
$cmd
)
)
&
$cmd
if
(
$lastexitcode
-ne
0
)
{
Throw
(
"Exec: "
+
$errorMessage
)
}
}
Try
{
$RemoteRoot
=
"https://gitlab.com/minds"
i
f
(
$Ssh
)
{
I
f
(
$Ssh
)
{
$RemoteRoot
=
"git@gitlab.com:minds"
}
# Clone the main repo
git
checkout
master
git
pull
Write-Host
"Using
$RemoteRoot
"
# Setup the other repos
git
clone
$RemoteRoot
/front.git
front
--config
core.autocrlf
=
input
git
clone
$RemoteRoot
/engine.git
engine
--config
core.autocrlf
=
input
git
clone
$RemoteRoot
/sockets.git
socket
--config
core.autocrlf
=
input
# Fetch latest
Exec
{
git
pull
}
if
(
$LastExitCode
-ne
0
)
{
throw
"Something failed"
}
# Setup the other repos
Exec
{
git
clone
$RemoteRoot
/front.git
front
--config
core.autocrlf
=
input
}
Exec
{
git
clone
$RemoteRoot
/engine.git
engine
--config
core.autocrlf
=
input
}
Exec
{
git
clone
$RemoteRoot
/sockets.git
sockets
--config
core.autocrlf
=
input
}
}
c
atch
{
C
atch
{
Pop-Location
e
xit
1
E
xit
1
}
f
inally
{
F
inally
{
Pop-Location
e
xit
0
E
xit
0
}
This diff is collapsed.
init.sh
View file @
eb1805a5
...
...
@@ -31,10 +31,9 @@ fi
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
# Clone the main repo
git checkout master
git pull
# Setup the other repos
git clone
$REMOTE_ROOT
/front front
--config
core.autocrlf
=
input
git clone
$REMOTE_ROOT
/engine engine
--config
core.autocrlf
=
input
git clone
$REMOTE_ROOT
/sockets socket
--config
core.autocrlf
=
input
git clone
$REMOTE_ROOT
/sockets socket
s
--config
core.autocrlf
=
input
This diff is collapsed.
Please
register
or
sign in
to comment