mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
+2
-2
@@ -89,7 +89,7 @@ jobs:
|
||||
- sudo /snap/bin/lxd init --auto
|
||||
install:
|
||||
script:
|
||||
- sudo snapcraft --use-lxd
|
||||
- ./scripts/build_snap.sh
|
||||
after_failure:
|
||||
- sudo journalctl -u snapd
|
||||
|
||||
@@ -135,7 +135,7 @@ deploy:
|
||||
stage: build
|
||||
- provider: snap
|
||||
snap: dvc_*.snap
|
||||
channel: ${TRAVIS_TAG:+stable}${TRAVIS_TAG:-edge}
|
||||
channel: $SNAP_CHANNEL
|
||||
skip_cleanup: true
|
||||
on:
|
||||
all_branches: true
|
||||
|
||||
@@ -4,7 +4,7 @@ set -e
|
||||
set -x
|
||||
|
||||
if [ ! -d "dvc" ]; then
|
||||
echo "Please run this script from repository root"
|
||||
echo "Please run this script from repository root" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -17,12 +17,12 @@ python setup.py bdist_wheel --universal
|
||||
if [[ -n "$TRAVIS_TAG" ]]; then
|
||||
pip uninstall -y dvc
|
||||
if which dvc; then
|
||||
echo "ERROR: dvc command still exists! Unable to verify dvc version."
|
||||
echo "ERROR: dvc command still exists! Unable to verify dvc version." >&2
|
||||
exit 1
|
||||
fi
|
||||
pip install dist/dvc-*.whl
|
||||
if [[ "$(dvc --version)" != "$TRAVIS_TAG" ]]; then
|
||||
echo "ERROR: 'dvc --version'$(dvc -V) doesn't match '$TRAVIS_TAG'"
|
||||
echo "ERROR: 'dvc --version'$(dvc -V) doesn't match '$TRAVIS_TAG'" >&2
|
||||
exit 1
|
||||
fi
|
||||
pip uninstall -y dvc
|
||||
|
||||
@@ -29,7 +29,7 @@ fi
|
||||
|
||||
print_error()
|
||||
{
|
||||
echo -e "\e[31m$1\e[0m"
|
||||
echo -e "\e[31m$1\e[0m" >&2
|
||||
}
|
||||
|
||||
if [ ! -d "dvc" ]; then
|
||||
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ ! -d "dvc" ]; then
|
||||
echo "Please run this script from repository root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo snapcraft --use-lxd
|
||||
|
||||
pip uninstall -y dvc
|
||||
if which dvc; then
|
||||
echo "ERROR: dvc command still exists! Unable to verify dvc version." >&2
|
||||
exit 1
|
||||
fi
|
||||
sudo snap install --dangerous --classic dvc_*.snap
|
||||
if [[ -n "$TRAVIS_TAG" ]]; then
|
||||
# Make sure we have a correct version
|
||||
if [[ "$(dvc --version)" != "$TRAVIS_TAG" ]]; then
|
||||
echo "ERROR: 'dvc --version'$(dvc -V) doesn't match '$TRAVIS_TAG'" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
# ensure basic commands can run
|
||||
# N.B.: cannot run `dvc get` on travis (#2956)
|
||||
dvc version
|
||||
dvc.git status
|
||||
dvc.git fetch --all
|
||||
sudo snap remove dvc
|
||||
@@ -50,3 +50,9 @@ elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
ln -s -f /usr/local/bin/python3 /usr/local/bin/python
|
||||
ln -s -f /usr/local/bin/pip3 /usr/local/bin/pip
|
||||
fi
|
||||
|
||||
if [[ -n "$TRAVIS_TAG" ]]; then
|
||||
echo "export SNAP_CHANNEL=stable" >> env.sh
|
||||
else
|
||||
echo "export SNAP_CHANNEL=edge" >> env.sh
|
||||
fi
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ summary: Data Version Control
|
||||
description: Git for Data & Models https://dvc.org
|
||||
adopt-info: dvc
|
||||
grade: stable
|
||||
confinement: classic # for same reasons as snap `git-ubuntu`
|
||||
confinement: classic # for `dvc run`ning external binaries
|
||||
base: core18
|
||||
license: Apache-2.0
|
||||
layout:
|
||||
|
||||
Reference in New Issue
Block a user