From 40604c0b2abe4d51e5e7b41a0e71c78a958b0b87 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 6 Apr 2016 16:02:11 -0400 Subject: [pkg] copy helpers, freeze version --- Makefile | 1 + pkg/pyinst/pyinst-build.mk | 32 ++++++++++++++++++++++++++------ pkg/version-template | 8 ++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 pkg/version-template diff --git a/Makefile b/Makefile index 6a8fbecb..f96d810d 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ LRELE = lrelease DIST = dist/bitmask/ NEXT_VERSION = $(shell cat pkg/next-version) DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/ +GIT_COMMIT = $(shell git rev-parse HEAD) ################################# diff --git a/pkg/pyinst/pyinst-build.mk b/pkg/pyinst/pyinst-build.mk index 637390a8..a14f2a8d 100644 --- a/pkg/pyinst/pyinst-build.mk +++ b/pkg/pyinst/pyinst-build.mk @@ -1,9 +1,14 @@ -pyinst: - echo "*********************************************" - echo "MAKE SURE OF MANUALLY FREEZING VERSION FIRST!" - echo "*********************************************" +freeze-ver: + cp pkg/version-template src/leap/bitmask/_version.py + sed -i 's/^version_version\(.*\)/version_version = "$(NEXT_VERSION)"/' src/leap/bitmask/_version.py + sed -i 's/^full_revisionid\(.*\)/full_revisionid = "$(GIT_COMMIT)"/' src/leap/bitmask/_version.py + +pyinst: freeze-ver pyinstaller -y pkg/pyinst/bitmask.spec +reset-ver: + git checkout -- src/leap/bitmask/_version.py + pyinst-hacks: cp ../leap_common/src/leap/common/cacert.pem $(DIST) mkdir -p $(DIST)pysqlcipher @@ -44,13 +49,28 @@ pyinst-distribution-data: cp pkg/PixelatedWebmail.README $(DIST_VERSION) cp LICENSE $(DIST_VERSION) +pyinst-linux-helpers: + mkdir -p $(DIST_VERSION)apps/eip/files + # TODO compile static + cp /usr/sbin/openvpn $(DIST_VERSION)apps/eip/files/leap-openvpn + cp pkg/linux/bitmask-root $(DIST_VERSION)apps/eip/files/ + cp pkg/linux/leap-install-helper.sh $(DIST_VERSION)apps/eip/files/ + cp pkg/linux/polkit/se.leap.bitmask.bundle.policy $(DIST_VERSION)apps/eip/files/ + mkdir -p $(DIST_VERSION)apps/mail + # TODO compile static + cp /usr/bin/gpg $(DIST_VERSION)apps/mail + pyinst-tar: cd dist/ && tar cvzf Bitmask.$(NEXT_VERSION).tar.gz bitmask-$(NEXT_VERSION) pyinst-sign: - # TODO ---- get LEAP_MAINTAINER from environment + gpg2 -a --sign --detach-sign dist/Bitmask.$(NEXT_VERSION).tar.gz + +pyinst-upload: + scp dist/Bitmask.$(NEXT_VERSION).* salmon.leap.se:./ -pyinst-linux: pyinst pyinst-hacks pyinst-trim pyinst-wrapper pyinst-cleanup pyinst-distribution-data pyinst-tar +#pyinst-linux: pyinst pyinst-hacks pyinst-trim pyinst-wrapper pyinst-cleanup pyinst-distribution-data pyinst-tar +pyinst-linux: pyinst reset-ver pyinst-hacks pyinst-trim pyinst-cleanup pyinst-distribution-data pyinst-linux-helpers pyinst-tar clean_pkg: rm -rf build dist diff --git a/pkg/version-template b/pkg/version-template new file mode 100644 index 00000000..ecb5b987 --- /dev/null +++ b/pkg/version-template @@ -0,0 +1,8 @@ +version_version = "xxx" +full_revisionid = 'deadbeef' + + +def get_versions(default={}, verbose=False): + return {'version': version_version, + 'full-revisionid': full_revisionid} + -- cgit v1.2.3