-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(release): merge branch develop (release 0.1.2)
- Loading branch information
Showing
9 changed files
with
191 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
name: "tagged-release" | ||
name: "release-notes" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
tagged-release: | ||
name: "Tagged Release" | ||
release-notes: | ||
name: "Regex Filtered Release Notes" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
|
||
- name: "Build & test" | ||
run: | | ||
echo "done!" | ||
- uses: "marvinpinto/action-automatic-releases@v1.2.0" | ||
- uses: "marcantondahmen/release-notes-action@master" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
draft: false | ||
filter: "^(feat|fix)" | ||
strict: true |
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 @@ | ||
#!/bin/bash | ||
|
||
# Run this script on a feature, bugfix or refactoring branch to squash and merge changes to develop. | ||
|
||
# Change to the base directory of the repository. | ||
dir=$(dirname "$0") | ||
cd "$dir/.." | ||
|
||
branch=$(git branch | egrep -v "(master|develop)" | grep \* | sed "s|\* ||") | ||
|
||
if [[ ! $branch ]] | ||
then | ||
echo "You are not on a feature, bugfix or refactor branch!" | ||
exit 0 | ||
fi | ||
|
||
if [[ $(git status -s) ]] | ||
then | ||
echo "Working directory is not clean!" | ||
git status -s | ||
exit 0 | ||
fi | ||
|
||
while true | ||
do | ||
read -n 1 -p "Finish $branch? (y/n) " option | ||
case $option in | ||
[Yy]* ) | ||
break | ||
;; | ||
[Nn]* ) | ||
exit 0 | ||
;; | ||
* ) | ||
echo "Please only enter \"y\" or \"n\"." | ||
;; | ||
esac | ||
done | ||
|
||
msg="$( echo $branch | sed -E 's|([^/]+)/([^/]+)/(.*)|\1(\2): \3|' | sed 's|_| |g' )" | ||
|
||
git checkout develop | ||
git merge $branch --no-ff -m "$msg" && git branch --delete $branch |
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,57 @@ | ||
#!/bin/bash | ||
|
||
# Run this script to checkout develop and start a fresh feature, bugfix or refactor branch. | ||
|
||
# Change to the base directory of the repository. | ||
dir=$(dirname "$0") | ||
cd "$dir/.." | ||
|
||
if [[ $(git status -s) ]] | ||
then | ||
echo "Working directory is not clean!" | ||
git status -s | ||
exit 0 | ||
fi | ||
|
||
git checkout develop | ||
|
||
echo "Choose type of branch:" | ||
echo | ||
echo " 1) Feature (default)" | ||
echo " 2) Bugfix" | ||
echo " 3) Refactor" | ||
echo | ||
read -n 1 -p "Please select a number or press Enter for a Feature: " option | ||
echo | ||
|
||
case $option in | ||
1) branchType="feat";; | ||
2) branchType="fix";; | ||
3) branchType="refactor";; | ||
*) branchType="feat";; | ||
esac | ||
|
||
read -p "Please enter a scope: " branchScope | ||
|
||
read -p "Please enter a name: " branchName | ||
|
||
branch="$branchType/$branchScope/$( echo $branchName | tr '[:upper:]' '[:lower:]' | sed 's/ /_/g' )" | ||
|
||
while true | ||
do | ||
read -n 1 -p "Create $branch? (y/n) " option | ||
case $option in | ||
[Yy]* ) | ||
break | ||
;; | ||
[Nn]* ) | ||
exit 0 | ||
;; | ||
* ) | ||
echo "Please only enter \"y\" or \"n\"." | ||
;; | ||
esac | ||
done | ||
|
||
git branch $branch | ||
git checkout $branch |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,9 @@ | ||
revitron.geometry | ||
================= | ||
|
||
.. automodule:: revitron.geometry | ||
:members: | ||
:undoc-members: | ||
:inherited-members: | ||
:show-inheritance: | ||
:autosummary: |
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,59 @@ | ||
""" | ||
The Geometry submodule and its ``Geometry`` class contain useful helpers for handling | ||
**Revit** element geometries. Note that it is possible to use the ``_()`` shorthand to get | ||
the geometry of an element as follows:: | ||
geometry = _(element).getGeometry() | ||
The full syntax without using the shorthand can also be used:: | ||
geometry = revitron.Geometry(element) | ||
""" | ||
|
||
|
||
class Geometry: | ||
""" | ||
A collection of useful methods for handling Revit element geometries. | ||
""" | ||
|
||
def __init__(self, element): | ||
""" | ||
Inits a new Geometry instance. | ||
Args: | ||
element (object): A Revit element | ||
""" | ||
import revitron | ||
self._geometry = element.get_Geometry(revitron.DB.Options()) | ||
|
||
|
||
def getFaces(self): | ||
""" | ||
Get a list of all faces of a given element. | ||
Returns: | ||
list: A list of face objects | ||
""" | ||
faces = [] | ||
for solid in self.getSolids(): | ||
for face in solid.Faces: | ||
faces.append(face) | ||
return faces | ||
|
||
|
||
def getSolids(self): | ||
""" | ||
Get a list of all solids of a given element. | ||
Returns: | ||
list: A list of solid objects | ||
""" | ||
solids = [] | ||
for geo in self._geometry: | ||
for item in geo.GetInstanceGeometry(): | ||
try: | ||
if item.Volume: | ||
solids.append(item) | ||
except: | ||
pass | ||
return solids |