-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add functions for forward-compatibility * Enable new release process including automatic deployment of updates * Clean up documentation
- Loading branch information
Showing
16 changed files
with
219 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$(grep version dials_data/__init__.py | cut -d'"' -f 2) | ||
set -e | ||
|
||
RESTRICT_REPOSITORY="dials/data" | ||
if [[ "${TRAVIS_REPO_SLUG}" != "${RESTRICT_REPOSITORY}" ]]; then | ||
echo Skipping step outside of ${RESTRICT_REPOSITORY} repository | ||
exit 0 | ||
fi | ||
|
||
VERSION=$(grep "^__version__" dials_data/__init__.py | cut -d'"' -f 2) | ||
BASETAG=v${VERSION} | ||
DEPTH=$(git rev-list ${BASETAG}..HEAD --count) | ||
git tag --list | grep "^${BASETAG}$" || { | ||
echo Searching for tag on remote | ||
if git fetch origin tag ${BASETAG}; then | ||
echo Tag found on remote. Deepening checkout... | ||
git fetch --shallow-exclude ${BASETAG} | ||
git fetch --deepen 1 | ||
else | ||
echo "Tag not found on remote. Let's make a new one!" | ||
git tag ${BASETAG} | ||
# assume git credentials were previously set in update-hashinfo | ||
git push origin ${BASETAG} | ||
fi | ||
} | ||
|
||
DEPTH=$(git rev-list ${BASETAG}..HEAD --count --first-parent) | ||
REAL_VERSION=${VERSION%.0}.${DEPTH} | ||
sed -i "s/^__version__.*/__version__ = \"${REAL_VERSION}\"/" dials_data/__init__.py | ||
echo Setting package version from ${VERSION} to ${REAL_VERSION} | ||
sed -i "s/^__version__ =.*/__version__ = \"${REAL_VERSION}\"/" dials_data/__init__.py | ||
sed -i "s/^\(\s\+\)version=\".*\",$/\1version=\"${REAL_VERSION}\",/" setup.py | ||
echo Set package version from ${VERSION} to ${REAL_VERSION} | ||
|
||
COMMIT=$(git rev-parse --verify HEAD) | ||
echo Setting package commit to ${COMMIT} | ||
sed -i "s/^__commit__ =.*/__commit__ = \"${COMMIT}\"/" dials_data/__init__.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} | ||
|
||
{% if page_source_suffix %} | ||
{% set suffix = page_source_suffix %} | ||
{% else %} | ||
{% set suffix = source_suffix %} | ||
{% endif %} | ||
|
||
{% if meta is defined and meta is not none %} | ||
{% set check_meta = True %} | ||
{% else %} | ||
{% set check_meta = False %} | ||
{% endif %} | ||
|
||
<div role="navigation" aria-label="breadcrumbs navigation"> | ||
|
||
<ul class="wy-breadcrumbs"> | ||
{% block breadcrumbs %} | ||
<li><a href="{{ pathto(master_doc) }}">{{ _('Docs') }}</a> »</li> | ||
{% for doc in parents %} | ||
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> »</li> | ||
{% endfor %} | ||
<li>{{ title }}</li> | ||
{% endblock %} | ||
{% block breadcrumbs_aside %} | ||
<li class="wy-breadcrumbs-aside"> | ||
<a href="https://github.com/dials/data" class="fa fa-github"> View project on GitHub</a> | ||
</li> | ||
{% endblock %} | ||
</ul> | ||
|
||
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} | ||
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation"> | ||
{% if next %} | ||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> | ||
{% endif %} | ||
{% if prev %} | ||
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
<hr/> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
py | ||
pytest | ||
pyyaml | ||
setuptools | ||
|
Oops, something went wrong.