mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-25 23:09:49 +01:00
A few minor adjustments to make what we currently have work, while I prepare new func tests. Fixes #175 Signed-off-by: Ruslan Kuprieiev <[email protected]>
39 lines
740 B
Bash
39 lines
740 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
BASE_DIR_S3=https://s3-us-west-2.amazonaws.com/dataversioncontrol/functests
|
|
RAW_DATA_S3=$BASE_DIR_S3/stackoverflow_raw_small
|
|
|
|
RAW_DATA_LOCAL=sync_raw_data
|
|
CODE_LOCAL=sync_code
|
|
TEST_REPO=repo_test
|
|
|
|
function dvc_info() {
|
|
echo "=============== DVC test: $1 ==============="
|
|
}
|
|
|
|
function _init_repo() {
|
|
dvc_info 'init reporitory'
|
|
git init
|
|
dvc init
|
|
|
|
dvc_info 'import xml files'
|
|
mkdir data/xml
|
|
dvc import ../$RAW_DATA_LOCAL/* data/xml
|
|
|
|
dvc_info 'copy code'
|
|
mkdir code
|
|
cp ../$CODE_LOCAL/* code/
|
|
git add code/
|
|
git commit -m 'Add code'
|
|
}
|
|
|
|
function create_repo() {
|
|
dvc_info 'create reporitory'
|
|
rm -rf $TEST_REPO
|
|
mkdir $TEST_REPO
|
|
(cd $TEST_REPO && _init_repo)
|
|
}
|
|
|