Skip to content

Commit

Permalink
fix workflow to get executed when tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagharsh Kandilian committed Sep 18, 2020
1 parent 74285cc commit 4900401
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
18 changes: 10 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ orbs:
slack: circleci/slack@3.4.2

workflows:
build_and_deploy:
test:
jobs:
- test:
context: test
test_and_deploy:
jobs:
- test:
context: test
# filters:
# tags:
# only: /[0-9]+(\.[0-9]+)*/
filters:
tags:
only: /[0-9]+(\.[0-9]+)*/
branches:
ignore: /.*/
- deploy:
context: pypi
requires:
Expand Down Expand Up @@ -56,10 +62,6 @@ jobs:
- image: circleci/python:3.8
steps:
- checkout
- run:
name: "Verify git tag vs. version"
command: |
python setup.py verify
- run:
name: "Init .pypirc"
command: |
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,3 @@ Activeloop’s Hub format lets you achieve faster inference at a lower cost. Tes
Similarly to other dataset management packages, `Hub` is a utility library that downloads and prepares public datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have license to use the dataset. It is your responsibility to determine whether you have permission to use the dataset under the dataset's license.

If you're a dataset owner and wish to update any part of it (description, citation, etc.), or do not want your dataset to be included in this library, please get in touch through a [GitHub issue](https://github.com/activeloopai/Hub/issues/new). Thanks for your contribution to the ML community!

25 changes: 3 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools.command.install import install

project = "hub"
VERSION = "0.12.2"
VERSION = "0.12.4"

this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, "README.md")) as f:
Expand All @@ -14,30 +14,14 @@
with open(os.path.join(this_directory, "requirements.txt"), "r") as f:
requirements = f.readlines()


class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""

description = "verify that the git tag matches our version"

def run(self):
tag = os.getenv("CIRCLE_TAG")

if tag != VERSION:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, VERSION
)
sys.exit(info)


setup(
name=project,
version=VERSION,
description="Snark Hub",
long_description=long_description,
long_description_content_type="text/markdown",
author="Snark AI Inc.",
author_email="support@snark.ai",
author_email="support@activeloop.ai",
url="https://github.com/snarkai/hub",
packages=find_packages(),
include_package_data=True,
Expand All @@ -54,8 +38,5 @@ def run(self):
"hub-dev = hub.cli.dev:cli",
]
},
tests_require=["pytest", "mock>=1.0.1"],
cmdclass={
"verify": VerifyVersionCommand,
},
tests_require=["pytest", "mock>=1.0.1"]
)

0 comments on commit 4900401

Please sign in to comment.