Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
deployer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Sistemisti
deployer
Commits
864aa42c
Commit
864aa42c
authored
Nov 18, 2020
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle cd failing
Signed-off-by:
Mattia Rizzolo
<
mapreri@ubuntu.com
>
parent
ab032d0d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
utils/bzr.sh
utils/bzr.sh
+3
-3
utils/git.sh
utils/git.sh
+3
-3
No files found.
utils/bzr.sh
View file @
864aa42c
...
@@ -13,7 +13,7 @@ bzr_clone_repo() {
...
@@ -13,7 +13,7 @@ bzr_clone_repo() {
if
[[
!
-d
"
${
dest
}
"
]]
;
then
if
[[
!
-d
"
${
dest
}
"
]]
;
then
bzr branch
"
${
url
}
"
"
${
dest
}
"
-q
bzr branch
"
${
url
}
"
"
${
dest
}
"
-q
else
else
(
cd
"
${
dest
}
"
;
bzr pull
-q
)
(
cd
"
${
dest
}
"
&&
bzr pull
-q
)
fi
fi
}
}
...
@@ -31,7 +31,7 @@ bzr_needs_update() {
...
@@ -31,7 +31,7 @@ bzr_needs_update() {
return
0
return
0
fi
fi
latest
=
"
$(
cd
"
${
repo
}
"
;
bzr revno
)
"
latest
=
"
$(
cd
"
${
repo
}
"
&&
bzr revno
)
"
if
[[
"
$(
cat
"
${
current
}
"
)
"
!=
"
${
latest
}
"
]]
;
then
if
[[
"
$(
cat
"
${
current
}
"
)
"
!=
"
${
latest
}
"
]]
;
then
return
0
return
0
...
@@ -51,5 +51,5 @@ bzr_save_revision() {
...
@@ -51,5 +51,5 @@ bzr_save_revision() {
repo
=
"
${
DIR_BASE
}
/
${
name
}
/repo"
repo
=
"
${
DIR_BASE
}
/
${
name
}
/repo"
dest
=
"
${
build
}
/.revision"
dest
=
"
${
build
}
/.revision"
(
cd
"
${
repo
}
"
;
bzr revno
)
>
"
${
dest
}
"
(
cd
"
${
repo
}
"
&&
bzr revno
)
>
"
${
dest
}
"
}
}
utils/git.sh
View file @
864aa42c
...
@@ -13,7 +13,7 @@ git_clone_repo() {
...
@@ -13,7 +13,7 @@ git_clone_repo() {
if
[[
!
-d
"
${
dest
}
"
]]
;
then
if
[[
!
-d
"
${
dest
}
"
]]
;
then
git clone
"
${
url
}
"
"
${
dest
}
"
-q
git clone
"
${
url
}
"
"
${
dest
}
"
-q
else
else
(
cd
"
${
dest
}
"
;
git pull
-q
)
(
cd
"
${
dest
}
"
&&
git pull
-q
)
fi
fi
echo
"
${
dest
}
"
echo
"
${
dest
}
"
...
@@ -33,7 +33,7 @@ git_needs_update() {
...
@@ -33,7 +33,7 @@ git_needs_update() {
return
0
return
0
fi
fi
latest
=
"
$(
cd
${
repo
}
;
git rev-parse master
)
"
latest
=
"
$(
cd
"
${
repo
}
"
&&
git rev-parse master
)
"
if
[[
"
$(
cat
"
${
current
}
"
)
"
!=
"
${
latest
}
"
]]
;
then
if
[[
"
$(
cat
"
${
current
}
"
)
"
!=
"
${
latest
}
"
]]
;
then
return
0
return
0
...
@@ -53,5 +53,5 @@ git_save_revision() {
...
@@ -53,5 +53,5 @@ git_save_revision() {
repo
=
"
${
DIR_BASE
}
/
${
name
}
/repo"
repo
=
"
${
DIR_BASE
}
/
${
name
}
/repo"
dest
=
"
${
build
}
/.commit"
dest
=
"
${
build
}
/.commit"
(
cd
"
${
repo
}
"
;
git rev-parse master
)
>
"
${
dest
}
"
(
cd
"
${
repo
}
"
&&
git rev-parse master
)
>
"
${
dest
}
"
}
}
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