Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ebulk
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ebulk
Commits
9de1e703
Commit
9de1e703
authored
Oct 16, 2020
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixing: check invalid dataset name before store it in local config file
- fix indentation
parent
5775db93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
12 deletions
+35
-12
ebulk
ebulk
+32
-9
ebulk-data/embulk-wendelin-dataset-tool/lib/embulk/input/fif.rb
...data/embulk-wendelin-dataset-tool/lib/embulk/input/fif.rb
+3
-3
No files found.
ebulk
View file @
9de1e703
...
...
@@ -62,6 +62,7 @@ function helpReadme {
}
function
checkParameters
{
re
=
'^[_A-Za-z.0-9-]*$'
if
[
!
-f
$TEMPLATE_FILE
]
;
then
echo
echo
-e
"
${
ORANGE
}
[ERROR] File '
$TEMPLATE_FILE
' not found!
${
NC
}
"
>
&2
;
return
1
...
...
@@ -91,6 +92,19 @@ function checkParameters {
fi
fi
EBULK_DATASET_FILE
=
"
$DATASET_DIR$EBULK_DATASET_FILE_NAME
"
if
!
[[
$REFERENCE
=
~
$re
]]
;
then
if
[
"
$REFERENCE
"
=
"."
]
&&
[[
-z
"
$STORAGE
"
]]
;
then
echo
echo
-e
"
${
ORANGE
}
[ERROR] You are not in a dataset directory
${
GREEN
}
'
$REFERENCE
'
${
ORANGE
}
.
${
NC
}
"
echo
else
echo
echo
-e
"
${
ORANGE
}
[ERROR] Error in argument: invalid dataset name
${
GREEN
}
'
$REFERENCE
'
${
ORANGE
}
.
${
NC
}
"
echo
-e
"
${
ORANGE
}
[ERROR] Only alphanumerics, dots ( . ), underscores ( _ ) and hyphens ( - ) are allowed.
${
NC
}
"
echo
fi
helpReadme
>
&2
;
return
1
fi
if
[[
$DATASET_DIR
!=
$REFERENCE
]]
;
then
if
[
"
$REFERENCE
"
=
"."
]
;
then
REFERENCE
=
$(
basename
"
$DATASET_DIR
"
)
...
...
@@ -124,7 +138,6 @@ function checkParameters {
if
[
"
$DATA_SET
"
==
"."
]
;
then
DATA_SET
=
$(
basename
$(
pwd
))
fi
re
=
'^[_A-Za-z.0-9-]*$'
if
!
[[
$DATA_SET
=
~
$re
]]
;
then
if
[
"
$DATA_SET
"
=
"."
]
&&
[[
-z
"
$STORAGE
"
]]
;
then
echo
...
...
@@ -750,6 +763,9 @@ case $OPERATION in
echo
fi
echo
"### DATASET DOWNLOAD ###"
if
[
"
$ALWAYS_YES
"
=
"true"
]
;
then
echo
"[always yes mode]"
fi
echo
if
[
"
$DISCARD_CHANGES
"
!=
""
]
;
then
DISCARD_CHANGES_FILE
=
"
$DATASET_DIR$DISCARD_CHANGES_FILE_NAME
"
...
...
@@ -759,8 +775,10 @@ case $OPERATION in
echo
-e
"** The dataset will be downloaded in the specified directory:
$DATASET_DIR
"
fi
echo
read
-n
1
-s
-r
-p
"Press any key to continue"
echo
if
[
"
$ALWAYS_YES
"
=
"false"
]
;
then
read
-n
1
-s
-r
-p
"Press any key to continue"
echo
fi
runProcess
;;
push
)
...
...
@@ -799,12 +817,17 @@ case $OPERATION in
esac
fi
echo
"### DATASET INGESTION ###"
echo
echo
-e
"** The tool will look for dataset files in the specified
$MESSAGE
"
echo
-e
"** Please make sure to put your dataset files there for ingestion."
echo
read
-n
1
-s
-r
-p
"Press any key to continue"
echo
if
[
"
$ALWAYS_YES
"
=
"true"
]
;
then
echo
"[always yes mode]"
else
echo
echo
-e
"** The tool will look for dataset files in the specified
$MESSAGE
"
echo
-e
"** Please make sure to put your dataset files there for ingestion."
echo
read
-n
1
-s
-r
-p
"Press any key to continue"
fi
echo
runProcess
;;
esac
...
...
ebulk-data/embulk-wendelin-dataset-tool/lib/embulk/input/fif.rb
View file @
9de1e703
...
...
@@ -138,9 +138,9 @@ module Embulk
@logger
.
error
(
"Your current dataset is outdated. Please, run a download to update it before ingest your changes."
,
print
=
TRUE
)
puts
@logger
.
abortExecution
(
error
=
FALSE
)
end
end
end
end
end
end
@logger
.
info
(
"Supplier:
#{
task
[
'supplier'
]
}
"
)
@logger
.
info
(
"Dataset name:
#{
task
[
'data_set'
]
}
"
)
...
...
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