-
Notifications
You must be signed in to change notification settings - Fork 67
Better Windows support #103
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
Changes from all commits
0b03147
f772614
2bb321b
64be789
43db3a0
f6ecb07
72b73e4
eaa2aa6
4458225
37b43b4
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,23 @@ | ||
name: Rebase | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 */12 * * *' | ||
|
||
jobs: | ||
rebase: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: git config user.name "$(git log -1 --pretty=format:'%aN')" | ||
- run: git config user.email "$(git log -1 --pretty=format:'%aE')" | ||
- run: git fetch --prune --unshallow origin +refs/tags/*:refs/tags/* | ||
- run: git fetch https://github.com/stacked-git/stgit.git master | ||
- run: git rebase FETCH_HEAD | ||
- name: Push changes | ||
uses: ad-m/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} | ||
force: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,32 +35,32 @@ install-html: | |
lint: lint-black lint-isort lint-flake8 lint-t | ||
|
||
lint-black: | ||
$(PYTHON) -m black --check --quiet --diff . stg | ||
$(PYTHON) -m black --check --quiet --diff . | ||
|
||
lint-isort: | ||
$(PYTHON) -m isort --check-only --quiet --diff . stg | ||
$(PYTHON) -m isort --check-only --quiet --diff . | ||
|
||
lint-flake8: | ||
$(PYTHON) -m flake8 . stg | ||
$(PYTHON) -m flake8 . | ||
|
||
lint-t: | ||
$(MAKE) -C t test-lint | ||
|
||
.PHONY: lint lint-black lint-isort lint-flake8 lint-t | ||
|
||
format: | ||
$(PYTHON) -m black . stg | ||
$(PYTHON) -m isort --quiet . stg | ||
$(PYTHON) -m black . | ||
$(PYTHON) -m isort --quiet . | ||
|
||
test: build | ||
$(MAKE) -C t all | ||
|
||
test-patches: | ||
for patch in $$(stg series --noprefix $(TEST_PATCHES)); do \ | ||
stg goto $$patch && $(MAKE) test || break; \ | ||
for patch in $$(t/stg series --noprefix $(TEST_PATCHES)); do \ | ||
t/stg goto $$patch && $(MAKE) test || break; \ | ||
done | ||
|
||
.PHONY: format test test-patches | ||
.PHONY: format test test-patches .install | ||
|
||
coverage: | ||
$(MAKE) coverage-test | ||
|
@@ -71,10 +71,11 @@ coverage-test: | |
$(MAKE) .coverage | ||
|
||
.coverage: | ||
rm -rf build | ||
rm -rf install | ||
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. what is adding this |
||
$(MAKE) build | ||
-mkdir .cov-files | ||
COVERAGE_FILE=$(CURDIR)/.cov-files/.coverage \ | ||
$(PYTHON) -m coverage run --context=setup setup.py build | ||
$(PYTHON) -m coverage run --context=setup setup.py install | ||
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. same |
||
COVERAGE_PROCESS_START=$(CURDIR)/pyproject.toml \ | ||
COVERAGE_FILE=$(CURDIR)/.cov-files/.coverage \ | ||
$(MAKE) -C t all | ||
|
@@ -101,6 +102,7 @@ clean: | |
$(MAKE) -C $$dir clean; \ | ||
done | ||
rm -rf build | ||
rm -rf inst | ||
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.
|
||
rm -rf dist | ||
rm -f stgit/*.pyc | ||
rm -rf stgit/__pycache__ | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
# This script is only used by the tests so they can work without stgit being | ||
# installed. It assumes PYTHONPATH to be set up correctly. | ||
Comment on lines
+1
to
+4
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. I think we want to avoid making changes like this to the test infra. The test infra is heavily borrowed from git -- every change we make makes it more difficult to update our infra to match git's. If think is something we think is important the best place to add it might be the Is this something that's needed for Windows? 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. Sorry for being MIA for so long... Yes, I agree, it is bad. Maybe move it out of |
||
|
||
CUR_DIR="$(pwd)" | ||
SCRIPT_DIR="$(dirname "$0")" | ||
cd "$SCRIPT_DIR" | ||
SCRIPT_DIR="$(pwd)" | ||
cd "$CUR_DIR" | ||
STGIT_ROOT="$(realpath "$SCRIPT_DIR/..")" | ||
|
||
# sanity check | ||
if test ! -f "$STGIT_ROOT/build/lib/stgit/main.py"; then | ||
echo >&2 "error: $STGIT_ROOT/build/lib/stgit/main.py missing (has stg been built?)." | ||
exit 1 | ||
fi | ||
|
||
PYTHON="${PYTHON:-python}" | ||
export PYTHONPATH="$STGIT_ROOT/build/lib" | ||
|
||
"$PYTHON" -m stgit.main "$@" |
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.
I think the rule has been removed?