-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle one line blocks as regular blocks #35
Changes from all commits
dc178c2
bf8b69c
1c43451
2b566fb
7bb29bb
f63356e
31a1e3d
3a34268
423f6af
c8bdad4
b22573c
d811860
74231ef
a1b5ccb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
|
||
bump-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- uses: dschep/install-pipenv-action@v1 | ||
- name: Install dependencies | ||
run: | | ||
pipenv install --dev | ||
- name: update docs and bump version | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git fetch --tags | ||
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
echo "latest tag: $latest_tag" | ||
new_tag=$(echo $latest_tag | awk -F. -v a="$1" -v b="$2" -v c="$3" '{printf("%d.%d.%d", $1+a, $2+b , $3+1)}') | ||
echo "new tag: $new_tag" | ||
|
||
## update python version | ||
echo "__version__ = '$new_tag'" > 'hcl2/version.py' | ||
|
||
git commit --reuse-message=HEAD@{1} hcl2/version.py || echo "No changes to commit" | ||
git push origin | ||
git tag $new_tag | ||
git push origin $new_tag | ||
publish-package: | ||
needs: bump-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- uses: dschep/install-pipenv-action@v1 | ||
- name: Install dependencies | ||
run: | | ||
pipenv install --dev | ||
- name: create python package | ||
run: | | ||
git config --local user.email "action@github.com" | ||
git config --local user.name "GitHub Action" | ||
git fetch --tags | ||
git pull | ||
pipenv run python setup.py sdist bdist_wheel | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
- name: sleep and wait for package to refresh | ||
run: | | ||
sleep 2m |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
"""Place of record for the package version""" | ||
__version__ = "0.3.2" | ||
|
||
__version__ = "0.3.0" | ||
__git_hash__ = "GIT_HASH" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "python-hcl2", | ||
"name": "bc-python-hcl2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. your referencing your fork, instead of the upstream your contributing to. |
||
"devDependencies": { | ||
"remark-cli": "^6.0.1", | ||
"remark-preset-lint-consistent": "^2.0.2", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ def get_requirements(): | |
|
||
|
||
setup( | ||
name='python-hcl2', | ||
name='bc-python-hcl2', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. your referencing your fork, instead of the upstream your contributing to. |
||
python_requires='>=3.6.0', | ||
version=get_version(), | ||
description="A parser for HCL2", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be in this pr, its unrelated to the functionality of the fix, ie. its switching ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. My bad. After waiting to get this one merged I created a temporal fork. Would gladly drop it when if the other changes in the PR looks good to the maintainers.