2019-01-20 03:50:10 +00:00
|
|
|
export VORTA_SRC := src/vorta
|
2020-09-10 05:26:38 +00:00
|
|
|
export FLATPAK_XML := src/vorta/assets/metadata/com.borgbase.Vorta.appdata.xml
|
|
|
|
VERSION := $(shell python -c "from src.vorta._version import __version__; print(__version__)")
|
2019-01-20 03:50:10 +00:00
|
|
|
|
|
|
|
.PHONY : help
|
|
|
|
.DEFAULT_GOAL := help
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
clean:
|
|
|
|
rm -rf dist/*
|
|
|
|
|
2021-01-20 04:59:37 +00:00
|
|
|
dist/Vorta.app: ## Build macOS app locally (without Borg)
|
2020-03-03 05:19:36 +00:00
|
|
|
pyinstaller --clean --noconfirm package/vorta.spec
|
2021-01-20 04:59:37 +00:00
|
|
|
cp -R /usr/local/Caskroom/sparkle/*/Sparkle.framework dist/Vorta.app/Contents/Frameworks/
|
|
|
|
rm -rf build/vorta dist/vorta
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-09-10 05:26:38 +00:00
|
|
|
dist/Vorta.dmg: dist/Vorta.app ## Create notarized macOS DMG for distribution.
|
2021-01-19 07:17:10 +00:00
|
|
|
python3 package/fix_app_qt_folder_names_for_codesign.py dist/Vorta.app
|
|
|
|
cd dist && sh ../package/macos-package-app.sh
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-09-10 05:26:38 +00:00
|
|
|
github-release: dist/Vorta.dmg ## Add new Github release and attach macOS DMG
|
|
|
|
cp dist/Vorta.dmg dist/vorta-${VERSION}.dmg
|
|
|
|
hub release create --attach=dist/vorta-${VERSION}.dmg v${VERSION}
|
2018-11-21 09:53:11 +00:00
|
|
|
git checkout gh-pages
|
|
|
|
git commit -m 'rebuild pages' --allow-empty
|
2018-11-30 00:40:18 +00:00
|
|
|
git push upstream gh-pages
|
2018-11-21 09:53:11 +00:00
|
|
|
git checkout master
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-09-10 05:26:38 +00:00
|
|
|
pypi-release: translations-to-qm ## Upload new release to PyPi
|
2018-11-21 08:22:33 +00:00
|
|
|
python setup.py sdist
|
2020-09-10 05:26:38 +00:00
|
|
|
twine upload dist/vorta-${VERSION}.tar.gz
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-09-10 05:26:38 +00:00
|
|
|
bump-version: ## Tag new version. First set new version number in src/vorta/_version.py
|
|
|
|
xmlstarlet ed -L -u 'component/releases/release/@date' -v $(shell date +%F) ${FLATPAK_XML}
|
|
|
|
xmlstarlet ed -L -u 'component/releases/release/@version' -v v${VERSION} ${FLATPAK_XML}
|
|
|
|
git commit -a -m "Bump version to v${VERSION}"
|
|
|
|
git tag -a v${VERSION}
|
2018-11-21 14:25:51 +00:00
|
|
|
|
2019-01-20 03:50:10 +00:00
|
|
|
translations-from-source: ## Extract strings from source code / UI files, merge into .ts.
|
|
|
|
pylupdate5 -verbose -translate-function trans_late \
|
2020-09-10 05:26:38 +00:00
|
|
|
${VORTA_SRC}/*.py ${VORTA_SRC}/views/*.py ${VORTA_SRC}/borg/*.py \
|
|
|
|
${VORTA_SRC}/assets/UI/*.ui \
|
|
|
|
-ts ${VORTA_SRC}/i18n/ts/vorta.en.ts
|
2019-01-20 03:50:10 +00:00
|
|
|
|
|
|
|
translations-push: translations-from-source ## Upload .ts to Transifex.
|
|
|
|
tx push -s
|
|
|
|
|
|
|
|
translations-pull: ## Download .ts from Transifex.
|
|
|
|
tx pull -a
|
|
|
|
|
|
|
|
translations-to-qm: ## Compile .ts text files to binary .qm files.
|
2020-09-10 05:26:38 +00:00
|
|
|
for f in $$(ls ${VORTA_SRC}/i18n/ts/vorta.*.ts); do lrelease $$f -qm ${VORTA_SRC}/i18n/qm/$$(basename $$f .ts).qm; done
|
2019-01-20 03:50:10 +00:00
|
|
|
|
2019-07-11 15:56:59 +00:00
|
|
|
flatpak-install: translations-to-qm
|
|
|
|
pip3 install --prefix=/app --no-deps .
|
2020-09-10 05:26:38 +00:00
|
|
|
install -D ${FLATPAK_XML} /app/share/metainfo/com.borgbase.Vorta.appdata.xml
|
2020-10-02 20:57:18 +00:00
|
|
|
install -D src/vorta/assets/icons/icon.svg /app/share/icons/hicolor/scalable/apps/com.borgbase.Vorta.svg
|
2020-08-11 03:51:14 +00:00
|
|
|
install -D package/icon-symbolic.svg /app/share/icons/hicolor/symbolic/apps/com.borgbase.Vorta-symbolic.svg
|
2019-11-04 07:31:21 +00:00
|
|
|
install -D src/vorta/assets/metadata/com.borgbase.Vorta.desktop /app/share/applications/com.borgbase.Vorta.desktop
|
2019-01-20 03:50:10 +00:00
|
|
|
|
|
|
|
help:
|
|
|
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|