Skip to content

Commit

Permalink
Merge pull request #118 from learningequality/npm_publish_and_pre_commit
Browse files Browse the repository at this point in the history
Npm publish and pre commit
  • Loading branch information
bjester authored Jan 12, 2024
2 parents 7c082b0 + b17514f commit 315a8bb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- run: make release-npm
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_API_TOKEN}}
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
exclude: (\.git/|\.tox/|\.venv/|le_utils\.egg-info)
repos:
- repo: local
hooks:
- id: rebuild-from-specs
name: Regenerate files
description: Regenerates files when specs or version has changed
entry: make build
language: system
files: (spec/.*\.json|setup\.py)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
Expand Down
5 changes: 4 additions & 1 deletion scripts/generate_from_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,7 @@ def set_package_json_version():

output_files += set_package_json_version()

subprocess.call(["pre-commit", "run", "--files"] + output_files)
env = os.environ.copy()
env["SKIP"] = "rebuild-from-specs"

subprocess.call(["pre-commit", "run", "--files"] + output_files, env=env)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
],
author="Learning Equality",
author_email="[email protected]",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <3.12",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <3.13",
)

0 comments on commit 315a8bb

Please sign in to comment.