Skip to content

Commit 365a7e3

Browse files
Updated Makefile to publish
1 parent a580f91 commit 365a7e3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ help:
1212
@echo "install - install all packages"
1313
@echo "install-dev - install all packages in editable mode"
1414
@echo "build - build all packages"
15-
@echo "publish - publish all packages to pypi, needs USERNAME and"
16-
@echo " PASSWORD"
15+
@echo "publish - publish all packages to pypi"
16+
@echo " Usage: make publish USERNAME=user PASSWORD=pass"
1717
@echo "set-version - set the version of all packages, needs VERSION"
1818

1919
set-version:
@@ -30,13 +30,18 @@ install-dev:
3030

3131
build:
3232
$(foreach package, $(PACKAGES), \
33-
cd $(package) && python setup.py sdist bdist_wheel && cd ..; \
33+
cd $(package) && pip build . && cd ..; \
3434
)
3535

3636
publish:
37+
@if [ -z "$(USERNAME)" ] || [ -z "$(PASSWORD)" ]; then \
38+
echo "Error: USERNAME and PASSWORD must be set"; \
39+
echo "Usage: make publish USERNAME=your_username PASSWORD=your_password"; \
40+
exit 1; \
41+
fi
3742
# publish after you have built the packages
3843
$(foreach package, $(PACKAGES), \
3944
cd $(package) && twine upload --repository pypi dist/* \
40-
-u $(USERNAME) -p $(PASSWORD) --disable-progress-bar && cd ..; \
45+
--username $(USERNAME) --password $(PASSWORD) --disable-progress-bar && cd ..; \
4146
)
4247

0 commit comments

Comments
 (0)