Skip to content

Commit

Permalink
build(release): merge branch develop (release 0.1.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantondahmen committed May 20, 2021
2 parents 2e884fe + 355d96c commit ffe2972
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 29 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "tagged-release"

on:
push:
tags:
- "*"

jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

steps:

- name: "Build & test"
run: |
echo "done!"
- uses: "marvinpinto/action-automatic-releases@v1.2.0"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
draft: false
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Marc Anton Dahmen
Copyright (c) 2020-2021 Marc Anton Dahmen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Revitron is a [Revit API](https://www.revitapidocs.com/) wrapper written in Python. It helps you to develop clean and powerful Revit plugins for [pyRevit](https://github.com/eirannejad/pyRevit).

![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/revitron/revitron?label=version)
![GitHub](https://img.shields.io/github/license/revitron/revitron?color=222222)
![GitHub top language](https://img.shields.io/github/languages/top/revitron/revitron?color=222222)
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/revitron/revitron?color=222222)
Expand All @@ -20,6 +21,4 @@ An installation guide, the API reference and the UI docs can be found [here](htt
Revitron unit tests need their own pyRevit UI to run. Since they are only needed to develop the library extension and would only bother normal users, all unit tests are located in a [separate repository](https://github.com/revitron/revitron-tests) and can be installed as an independent UI extension if required.

---

© 2020 [Marc Anton Dahmen](https://marcdahmen.de) — MIT license
© 2020-2021 [Marc Anton Dahmen](https://marcdahmen.de) — MIT license
2 changes: 1 addition & 1 deletion docs.bat → bin/docs.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set cwd=%~dp0
cd %cwd%
cd docs
cd ../docs
sphinx-apidoc --separate --ext-autodoc --ext-viewcode --templatedir source/_templates/ -TMf -o source/ ../revitron
call make html
cd %cwd%
8 changes: 8 additions & 0 deletions bin/docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

dir=`dirname $0`
cd "$dir/../docs"

sphinx-apidoc --separate --ext-autodoc --ext-viewcode --templatedir source/_templates/ -TMf -o source/ ../revitron

make html
74 changes: 74 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/sh

dir=`dirname $0`
cd "$dir/.."

# Check if working directory is clean.
if [[ $(git status -s) ]]
then
echo "Working directory is not clean!"
git status -s
echo
fi

# Get latest tag.
latestTag=$(git describe --tags $(git rev-list --tags --max-count=1))

# Choose type of release.
echo "Current version is: $latestTag"
echo

IFS='.' read -ra elem <<< "$latestTag"

major=${elem[0]}
minor=${elem[1]}
patch=${elem[2]}

newMajorTag=$((major + 1)).0.0
newMinorTag=$major.$((minor + 1)).0
newPatchTag=$major.$minor.$((patch + 1))

echo "Choose type of release:"
echo
echo " 1) Patch $newPatchTag (default)"
echo " 2) Minor $newMinorTag"
echo " 3) Major $newMajorTag"
echo
read -n 1 -p "Please select a number or press Enter for a patch: " option
echo

case $option in
1) tag=$newPatchTag;;
2) tag=$newMinorTag;;
3) tag=$newMajorTag;;
*) tag=$newPatchTag;;
esac

# Wait for confirmation.
while true
do
read -p "Create release \"$tag\"? (y/n) " continue
case $continue in
[Yy]* )
break
;;
[Nn]* )
exit 0
;;
* )
echo "Please only enter \"y\" or \"n\"."
;;
esac
done
echo

# Updating version numbers.
sed -i "s|REVITRON_VERSION.*|REVITRON_VERSION = '$tag'|g" "./revitron/__init__.py"

# Commit, merge and tag.
git add -A && git commit -m "build(release): prepare release $tag"
git checkout master
git merge develop --no-ff -m "build(release): merge branch develop (release $tag)"
git tag -a -m "Release $tag" $tag
git checkout develop
git log -n 2 --graph --all
Binary file modified docs/source/_static/revitron.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions docs/source/_static/revitron.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
html_theme = 'revitron_sphinx_theme'
html_theme_options = {
'navigation_depth': 5,
'github_url': 'https://github.com/revitron/revitron'
'github_url': 'https://github.com/revitron/revitron',
'color_scheme': 'dark'
}

html_logo = '_static/revitron.svg'
Expand Down
7 changes: 3 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ Revitron

.. container:: .large

Revitron is a `Revit API <https://www.revitapidocs.com/>`_ wrapper written in Python.
Revitron is a `Revit API <https://www.revitapidocs.com/>`_ wrapper written in Python.
It helps you to develop clean and powerful Revit plugins in `pyRevit <https://github.com/eirannejad/pyRevit>`_.

.. container:: .buttons

`Get Started ⟶ <get-started.html>`_

Version 0.1.0
`Docs <get-started.html>`_
`GitHub <https://github.com/revitron/revitron>`_

.. toctree::
:caption: Revitron
Expand Down
13 changes: 0 additions & 13 deletions release.sh

This file was deleted.

2 changes: 1 addition & 1 deletion revitron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
DB = Autodesk.Revit.DB
LIB_DIR = parent(parent(__file__))
REVIT_VERSION = pyrevit.HOST_APP.uiapp.Application.VersionNumber
REVITRON_VERSION = '0.1.0'
REVITRON_VERSION = '0.1.1'


def _(element):
Expand Down
4 changes: 2 additions & 2 deletions svg/revitron-readme.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ffe2972

Please sign in to comment.