2019-01-20 03:50:10 +00:00
|
|
|
export VORTA_SRC := src/vorta
|
2020-03-03 05:19:36 +00:00
|
|
|
export CERTIFICATE_NAME := "Developer ID Application: Manuel Riel (CNMSCAXT48)"
|
2019-01-20 03:50:10 +00:00
|
|
|
|
|
|
|
.PHONY : help
|
|
|
|
.DEFAULT_GOAL := help
|
2019-06-20 11:53:28 +00:00
|
|
|
DATE = "$(shell date +%F)"
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
clean:
|
|
|
|
rm -rf dist/*
|
|
|
|
|
2019-01-24 02:05:15 +00:00
|
|
|
icon-resources: ## Compile SVG icons to importable resource files.
|
|
|
|
pyrcc5 -o src/vorta/views/dark/collection_rc.py src/vorta/assets/icons/dark/collection.qrc
|
|
|
|
pyrcc5 -o src/vorta/views/light/collection_rc.py src/vorta/assets/icons/light/collection.qrc
|
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
dist/Vorta.app: translations-to-qm clean
|
|
|
|
pyinstaller --clean --noconfirm package/vorta.spec
|
2019-08-21 12:54:00 +00:00
|
|
|
cp -R bin/darwin/Sparkle.framework dist/Vorta.app/Contents/Frameworks/
|
2020-03-03 05:19:36 +00:00
|
|
|
cp -R ../borg/dist/borg-dir dist/Vorta.app/Contents/Resources/
|
|
|
|
rm -rf build
|
|
|
|
rm -rf dist/vorta
|
2019-06-11 00:19:25 +00:00
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
borg:
|
|
|
|
cd ../borg && pyinstaller --clean --noconfirm ../vorta/package/borg.spec .
|
|
|
|
find ../borg/dist/borg-dir -type f \( -name \*.so -or -name \*.dylib -or -name borg.exe \) \
|
|
|
|
-exec codesign --verbose --force --sign $(CERTIFICATE_NAME) \
|
|
|
|
--entitlements package/entitlements.plist --timestamp --deep --options runtime {} \;
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
dist/Vorta.dmg: dist/Vorta.app
|
|
|
|
sh package/macos-package-app.sh
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
github-release: dist/Vorta.dmg
|
2020-05-26 03:09:20 +00:00
|
|
|
cp dist/Vorta.dmg dist/dist/vorta-0.6.25.dmg
|
|
|
|
hub release create --attach=dist/vorta-0.6.25.dmg v0.6.25
|
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
|
|
|
|
2019-01-20 14:46:01 +00:00
|
|
|
pypi-release: translations-to-qm
|
2018-11-21 08:22:33 +00:00
|
|
|
python setup.py sdist
|
2020-05-26 03:09:20 +00:00
|
|
|
twine upload dist/vorta-0.6.25.tar.gz
|
2018-11-21 08:22:33 +00:00
|
|
|
|
2019-01-20 03:50:10 +00:00
|
|
|
bump-version: ## Add new version tag and push to upstream repo.
|
2018-11-21 14:25:51 +00:00
|
|
|
bumpversion patch
|
2018-12-25 05:53:27 +00:00
|
|
|
#bumpversion minor
|
2019-06-20 12:02:08 +00:00
|
|
|
xmlstarlet ed -L -u 'component/releases/release/@date' -v $$(date +%F) src/vorta/assets/metadata/com.borgbase.Vorta.appdata.xml
|
|
|
|
git commit -a -m 'Bump version'
|
2018-12-25 05:53:27 +00:00
|
|
|
git push upstream
|
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 \
|
|
|
|
$$VORTA_SRC/*.py $$VORTA_SRC/views/*.py $$VORTA_SRC/borg/*.py \
|
|
|
|
$$VORTA_SRC/assets/UI/*.ui \
|
|
|
|
-ts $$VORTA_SRC/i18n/ts/vorta.en_US.ts
|
|
|
|
|
|
|
|
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.
|
|
|
|
for f in $$(ls $$VORTA_SRC/i18n/ts/vorta.*.ts); do lrelease $$f -qm $$VORTA_SRC/i18n/qm/$$(basename $$f .ts).qm; done
|
|
|
|
|
2019-07-11 15:56:59 +00:00
|
|
|
flatpak-install: translations-to-qm
|
|
|
|
pip3 install --prefix=/app --no-deps .
|
2019-11-04 07:31:21 +00:00
|
|
|
install -D src/vorta/assets/metadata/com.borgbase.Vorta.appdata.xml /app/share/metainfo/com.borgbase.Vorta.appdata.xml
|
|
|
|
install -D src/vorta/assets/icons/scalable/com.borgbase.Vorta.svg /app/share/icons/hicolor/scalable/apps/com.borgbase.Vorta.svg
|
|
|
|
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}'
|