# This is a script run to release Cockpit
#
# This script is run in the cockpit/release container
# https://github.com/cockpit-project/cockpituous/tree/master/release
#
# Anything that start with 'job' may run in a way that it SIGSTOP's
# itself when preliminary preparition and then gets a SIGCONT in
# order to complete its work

# Initial variables which help the scripts share
RELEASE_SPEC=tools/cockpit.spec
RELEASE_CONTROL=tools/debian/control
RELEASE_SRPM=$PWD/_release/srpm
RELEASE_DSC=$PWD/_release/dsc
RELEASE_SOURCE=$PWD/_release/source

# Authenticate for pushing into Fedora dist-git
cat ~/.fedora-password | kinit cockpit@FEDORAPROJECT.ORG

# Build the source tarball patches and srpm
job release-source
job release-srpm


# Do fedora builds for the tag, using tarball
job release-koji -k master
job release-koji f29
job release-koji f30

# Upload release to github, using tarball
job release-github

# Push to COPR builds
job release-copr @cockpit/cockpit-preview

# Update the Github repo that Docker Hub is tracking
job release-dockerhub cockpit-project/cockpit-container
job release-dockerhub cockpituous/cockpit cockpit-project/cockpit

# Push out a Bodhi update
job release-bodhi F29
job release-bodhi F30

# Upload documentation
job bots/release-guide dist/guide cockpit-project/cockpit-project.github.io

# Create and publish a Debian repository and Ubuntu PPA
job release-dsc
job release-ubuntu-ppa
