diff --git a/MANIFEST.in b/MANIFEST.in index 759f5680..2294c44e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ include dom0/securedrop-update include config.json.example include README.md include LICENSE +include VERSION include Makefile include sd-proxy/* include sd-svs/* diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..17e51c38 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1.1 diff --git a/rpm-build/SPECS/securedrop-workstation-dom0-config.spec b/rpm-build/SPECS/securedrop-workstation-dom0-config.spec index 7c7137fb..2821c70b 100644 --- a/rpm-build/SPECS/securedrop-workstation-dom0-config.spec +++ b/rpm-build/SPECS/securedrop-workstation-dom0-config.spec @@ -1,12 +1,12 @@ Name: securedrop-workstation-dom0-config -Version: 0.0.1 +Version: 0.1.1 Release: 1%{?dist} Summary: SecureDrop Workstation Group: Library License: GPLv3+ URL: https://github.com/freedomofpress/securedrop-workstation -Source0: securedrop-workstation-dom0-config-0.0.1.tar.gz +Source0: securedrop-workstation-dom0-config-0.1.1.tar.gz BuildArch: noarch BuildRequires: python3-setuptools @@ -64,6 +64,9 @@ find /srv/salt -maxdepth 1 -type f -iname '*.top' \ | xargs qubesctl top.enable > /dev/null %changelog +* Fri Jan 10 2020 redshiftzero - 0.1.1 +- First alpha release. + * Fri Oct 26 2018 Kushal Das - 0.0.1-1 - First release diff --git a/setup.py b/setup.py index e2b83840..1a60c64b 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,13 @@ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() +with open("VERSION", "r", encoding="utf-8") as f: + version = f.read().strip() + setuptools.setup( name="securedrop-workstation-dom0-config", - version="0.0.1", - author="Kushal Das", + author="SecureDrop Team", + version=version, author_email="securedrop@freedom.press", description="SecureDrop Workstation", long_description=long_description, diff --git a/update_version.sh b/update_version.sh new file mode 100755 index 00000000..2d96deb1 --- /dev/null +++ b/update_version.sh @@ -0,0 +1,32 @@ +#!/bin/bash +## Usage: ./update_version.sh + +set -e + +readonly NEW_VERSION=$1 + +if [ -z "$NEW_VERSION" ]; then + echo "You must specify the new version!" + exit 1 +fi + +OLD_VERSION=$(cat VERSION) + +if [ -z "$OLD_VERSION" ]; then + echo "Couldn't find the old version: does this script need to be updated?" + exit 1 +fi + +# Update the version in rpm-build/SPECS/securedrop-workstation-dom0-config.spec and setup.py +# We just change Source0 and Version fields in the rpm spec. The spec file also contains the changelog entries, +# and we don't want to increment those versions. +if [[ "$OSTYPE" == "darwin"* ]]; then + # The empty '' after sed -i is required on macOS to indicate no backup file should be saved. + sed -i '' "s@$(echo "${OLD_VERSION}" | sed 's/\./\\./g')@$NEW_VERSION@g" VERSION + sed -i '' -e "/Source0/s/$OLD_VERSION/$NEW_VERSION/" rpm-build/SPECS/securedrop-workstation-dom0-config.spec + sed -i '' -e "/Version/s/$OLD_VERSION/$NEW_VERSION/" rpm-build/SPECS/securedrop-workstation-dom0-config.spec +else + sed -i "s@$(echo "${OLD_VERSION}" | sed 's/\./\\./g')@$NEW_VERSION@g" VERSION + sed -i -e "/Source0/s/$OLD_VERSION/$NEW_VERSION/" rpm-build/SPECS/securedrop-workstation-dom0-config.spec + sed -i -e "/Version/s/$OLD_VERSION/$NEW_VERSION/" rpm-build/SPECS/securedrop-workstation-dom0-config.spec +fi