Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Motion Bank
Services
Motion Bank API
Commits
5b1299e1
Commit
5b1299e1
authored
Sep 03, 2018
by
A. Koch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check if target exists when migrating
parent
144b82d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
bin/migrate.js
bin/migrate.js
+6
-6
No files found.
bin/migrate.js
View file @
5b1299e1
...
...
@@ -47,27 +47,27 @@ const proc = async function () {
anno
.
author
=
{
id
:
anno
.
author
}
console
.
log
(
'
updating author to
'
,
anno
.
author
)
}
if
(
typeof
anno
.
target
.
id
===
'
string
'
&&
anno
.
target
.
id
.
indexOf
(
timelinePrefix
)
===
0
)
{
if
(
anno
.
target
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
anno
.
target
.
id
.
indexOf
(
timelinePrefix
)
===
0
)
{
anno
.
target
.
id
=
anno
.
target
.
id
.
replace
(
timelinePrefix
,
`
${
newPrefix
}
maps/`
)
console
.
log
(
'
updating timeline target to
'
,
anno
.
target
.
id
)
}
if
(
typeof
anno
.
target
.
id
===
'
string
'
&&
anno
.
target
.
id
.
indexOf
(
gridPrefix
)
===
0
)
{
if
(
anno
.
target
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
anno
.
target
.
id
.
indexOf
(
gridPrefix
)
===
0
)
{
anno
.
target
.
id
=
anno
.
target
.
id
.
replace
(
gridPrefix
,
`
${
newPrefix
}
maps/`
)
console
.
log
(
'
updating grid target to
'
,
anno
.
target
.
id
)
}
if
(
anno
.
target
.
type
===
'
Video
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
if
(
anno
.
target
&&
anno
.
target
.
type
===
'
Video
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
anno
.
target
.
id
=
`
${
newPrefix
}
annotations/
${
anno
.
target
.
id
}
`
console
.
log
(
'
updating video target to
'
,
anno
.
target
.
id
)
}
if
(
anno
.
target
.
type
===
'
Annotation
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
if
(
anno
.
target
&&
anno
.
target
.
type
===
'
Annotation
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
anno
.
target
.
id
=
`
${
newPrefix
}
annotations/
${
anno
.
target
.
id
}
`
console
.
log
(
'
updating annotation target to
'
,
anno
.
target
.
id
)
}
if
(
anno
.
target
.
type
===
'
Timeline
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
if
(
anno
.
target
&&
anno
.
target
.
type
===
'
Timeline
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
anno
.
target
.
id
=
`
${
newPrefix
}
maps/
${
anno
.
target
.
id
}
`
console
.
log
(
'
updating timeline target to
'
,
anno
.
target
.
id
)
}
if
(
anno
.
target
.
type
===
'
2DGrid
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
if
(
anno
.
target
&&
anno
.
target
.
type
===
'
2DGrid
'
&&
typeof
anno
.
target
.
id
===
'
string
'
&&
uuid
.
isUUID
(
anno
.
target
.
id
))
{
anno
.
target
.
id
=
`
${
newPrefix
}
maps/
${
anno
.
target
.
id
}
`
console
.
log
(
'
updating grid target to
'
,
anno
.
target
.
id
)
}
...
...
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