2.6 changelog gen/version/root dir cleanup (#40421)

* patched in changelog gen stuff from stable-2.5
* Makefile updates
* release.py as single-source-of-truth
* Remove obsolete ansible-core-sitemap.xml file.
* Move ROADMAP.rst into README.rst.
* dynamic rpm changelog, zap old deb/rpm changelogs
* fix changelog in MANIFEST.in
* Remove obsolete hacking/update.sh script.
* Remove ref to deleted authors script.
* Remove ref to removed module-formatter script.
* Update headings to match script names.
* MANIFEST.in cleanup
* removed RELEASES.txt and versions.yml
* removed obsolete release generation playbook/bits (not used since 2.5)
* misc Makefile cleanup
* speculative changes to DEB versioning
* allow override of DEB_VERSION/DEB_RELEASE
pull/39930/head
Matt Davis 7 years ago committed by Matt Clay
parent eb818df1ec
commit e4edb2842a

2
.gitattributes vendored

@ -1,4 +1,2 @@
CHANGELOG.md merge=union
.github/ export-ignore
hacking/ export-ignore
ticket-stubs/ export-ignore

@ -1 +0,0 @@
test/sanity/yamllint/config/default.yml

File diff suppressed because it is too large Load Diff

@ -1,10 +1,9 @@
prune ticket_stubs
prune hacking
include README.rst COPYING
include README.rst
include COPYING
include SYMLINK_CACHE.json
include requirements.txt
include .coveragerc
include .yamllint
include examples/hosts
include examples/ansible.cfg
recursive-include lib/ansible/module_utils/powershell *
@ -15,8 +14,7 @@ recursive-include licenses *
recursive-include packaging *
recursive-include test *
include Makefile
include VERSION
include MANIFEST.in
include CHANGELOG.md
include changelogs/CHANGELOG-*.rst
include contrib/README.md
recursive-include contrib/inventory *

@ -34,9 +34,17 @@ GENERATE_CLI = docs/bin/generate_man.py
PYTHON=python
SITELIB = $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
# VERSION file provides one place to update the software version
VERSION := $(shell cat VERSION | cut -f1 -d' ')
RELEASE := $(shell cat VERSION | cut -f2 -d' ')
# fetch version from project release.py as single source-of-truth
VERSION := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --raw || echo error)
ifeq ($(findstring error,$(VERSION)), error)
$(error "version_helper failed")
endif
MAJOR_VERSION := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --majorversion)
CODENAME := $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --codename)
# if a specific release was not requested, set to 1 (RPMs have "fancier" logic for this further down)
RELEASE ?= 1
# Get the branch information from git
ifneq ($(shell which git),)
@ -62,15 +70,16 @@ DEBUILD_OPTS = --source-option="-I"
DPUT_BIN ?= dput
DPUT_OPTS ?=
DEB_DATE := $(shell LC_TIME=C date +"%a, %d %b %Y %T %z")
DEB_VERSION ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --debversion)
ifeq ($(OFFICIAL),yes)
DEB_RELEASE = $(RELEASE)ppa
DEB_RELEASE ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --debrelease)ppa
# Sign OFFICIAL builds using 'DEBSIGN_KEYID'
# DEBSIGN_KEYID is required when signing
ifneq ($(DEBSIGN_KEYID),)
DEBUILD_OPTS += -k$(DEBSIGN_KEYID)
endif
else
DEB_RELEASE = 100.git$(DATE)$(GITINFO)
DEB_RELEASE ?= 100.git$(DATE)$(GITINFO)
# Do not sign unofficial builds
DEBUILD_OPTS += -uc -us
DPUT_OPTS += -u
@ -90,7 +99,7 @@ PBUILDER_OPTS ?= --debootstrapopts --variant=buildd --architecture $(PBUILDER_AR
RPMSPECDIR= packaging/rpm
RPMSPEC = $(RPMSPECDIR)/ansible.spec
RPMDIST = $(shell rpm --eval '%{?dist}')
RPMRELEASE = $(RELEASE)
ifneq ($(OFFICIAL),yes)
RPMRELEASE = 100.git$(DATE)$(GITINFO)
endif
@ -98,12 +107,20 @@ ifeq ($(PUBLISH),nightly)
# https://fedoraproject.org/wiki/Packaging:Versioning#Snapshots
RPMRELEASE = $(RELEASE).$(DATE)git.$(GIT_HASH)
endif
RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)"
RPMVERSION ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --baseversion)
RPMRELEASE ?= $(shell $(PYTHON) packaging/release/versionhelper/version_helper.py --rpmrelease)
RPMNVR = "$(NAME)-$(RPMVERSION)-$(RPMRELEASE)$(RPMDIST)$(REPOTAG)"
# MOCK build parameters
MOCK_BIN ?= mock
MOCK_CFG ?=
# dynamically add repotag define only if specified
ifneq ($(REPOTAG),)
EXTRA_RPM_DEFINES += --define "repotag $(REPOTAG)"
endif
# ansible-test parameters
ANSIBLE_TEST ?= test/runner/ansible-test
TEST_FLAGS ?=
@ -147,9 +164,9 @@ authors:
sed "s/%VERSION%/$(VERSION)/" $< > $@
rm $<
# Regenerate %.1 if %.1.rst or VERSION has been modified more
# Regenerate %.1 if %.1.rst or release.py has been modified more
# recently than %.1. (Implicitly runs the %.1.rst recipe)
%.1: %.1.rst VERSION
%.1: %.1.rst lib/ansible/release.py
$(ASCII2MAN)
.PHONY: loc
@ -222,15 +239,23 @@ sdist: clean docs
sdist_upload: clean docs
$(PYTHON) setup.py sdist upload 2>&1 |tee upload.log
.PHONY: changelog_reno
changelog_reno:
reno -d changelogs/ report --title 'Ansible $(MAJOR_VERSION) "$(CODENAME)" Release Notes' --collapse-pre-release --no-show-source --earliest-version v$(MAJOR_VERSION).0a1 --output changelogs/CHANGELOG-v$(MAJOR_VERSION).rst
.PHONY: rpmcommon
rpmcommon: sdist
@mkdir -p rpm-build
@cp dist/*.gz rpm-build/
@sed -e 's#^Version:.*#Version: $(VERSION)#' -e 's#^Release:.*#Release: $(RPMRELEASE)%{?dist}$(REPOTAG)#' $(RPMSPEC) >rpm-build/$(NAME).spec
@cp $(RPMSPEC) rpm-build/$(NAME).spec
.PHONY: mock-srpm
mock-srpm: /etc/mock/$(MOCK_CFG).cfg rpmcommon
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/ \
--define "rpmversion $(RPMVERSION)" \
--define "upstream_version $(VERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES)
@echo "#############################################"
@echo "Ansible SRPM is built:"
@echo rpm-build/*.src.rpm
@ -238,7 +263,11 @@ mock-srpm: /etc/mock/$(MOCK_CFG).cfg rpmcommon
.PHONY: mock-rpm
mock-rpm: /etc/mock/$(MOCK_CFG).cfg mock-srpm
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --rebuild rpm-build/$(NAME)-*.src.rpm
$(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --bootstrap-chroot --old-chroot --rebuild rpm-build/$(NAME)-*.src.rpm \
--define "rpmversion $(RPMVERSION)" \
--define "upstream_version $(VERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES)
@echo "#############################################"
@echo "Ansible RPM is built:"
@echo rpm-build/*.noarch.rpm
@ -252,6 +281,10 @@ srpm: rpmcommon
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "upstream_version $(VERSION)" \
--define "rpmversion $(RPMVERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES) \
-bs rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec
@echo "#############################################"
@ -267,8 +300,12 @@ rpm: rpmcommon
--define "_srcrpmdir %{_topdir}" \
--define "_specdir $(RPMSPECDIR)" \
--define "_sourcedir %{_topdir}" \
--define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
--define "_rpmfilename $(RPMNVR).%%{ARCH}.rpm" \
--define "__python `which $(PYTHON)`" \
--define "upstream_version $(VERSION)" \
--define "rpmversion $(RPMVERSION)" \
--define "rpmrelease $(RPMRELEASE)" \
$(EXTRA_RPM_DEFINES) \
-ba rpm-build/$(NAME).spec
@rm -f rpm-build/$(NAME).spec
@echo "#############################################"
@ -282,7 +319,7 @@ debian: sdist
mkdir -p deb-build/$${DIST} ; \
tar -C deb-build/$${DIST} -xvf dist/$(NAME)-$(VERSION).tar.gz ; \
cp -a packaging/debian deb-build/$${DIST}/$(NAME)-$(VERSION)/ ; \
sed -ie "s|%VERSION%|$(VERSION)|g;s|%RELEASE%|$(DEB_RELEASE)|;s|%DIST%|$${DIST}|g;s|%DATE%|$(DEB_DATE)|g" deb-build/$${DIST}/$(NAME)-$(VERSION)/debian/changelog ; \
sed -ie "s|%VERSION%|$(DEB_VERSION)|g;s|%RELEASE%|$(DEB_RELEASE)|;s|%DIST%|$${DIST}|g;s|%DATE%|$(DEB_DATE)|g" deb-build/$${DIST}/$(NAME)-$(VERSION)/debian/changelog ; \
done
.PHONY: deb
@ -291,12 +328,12 @@ deb: deb-src
PBUILDER_OPTS="$(PBUILDER_OPTS) --distribution $${DIST} --basetgz $(PBUILDER_CACHE_DIR)/$${DIST}-$(PBUILDER_ARCH)-base.tgz --buildresult $(CURDIR)/deb-build/$${DIST}" ; \
$(PBUILDER_BIN) create $${PBUILDER_OPTS} --othermirror "deb http://archive.ubuntu.com/ubuntu $${DIST} universe" ; \
$(PBUILDER_BIN) update $${PBUILDER_OPTS} ; \
$(PBUILDER_BIN) build $${PBUILDER_OPTS} deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}.dsc ; \
$(PBUILDER_BIN) build $${PBUILDER_OPTS} deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}.dsc ; \
done
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
echo deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"
@ -310,7 +347,7 @@ local_deb: debian
@echo "#############################################"
@echo "Ansible DEB artifacts:"
@for DIST in $(DEB_DIST) ; do \
echo deb-build/$${DIST}/$(NAME)_$(VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
echo deb-build/$${DIST}/$(NAME)_$(DEB_VERSION)-$(DEB_RELEASE)~$${DIST}_amd64.changes ; \
done
@echo "#############################################"

@ -76,6 +76,29 @@ Branch Info
Information <https://docs.ansible.com/community.html>`_ for notes on
how to get started.
Roadmap
=======
Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.0, 2.1).
Subminor versions will generally not have roadmaps published.
Ansible 2.1 was the first release which published this and asked for feedback in this manner.
Feedback on the roadmap and the new process is quite welcome.
The team is aiming for further transparency and better inclusion of both community desires and submissions.
These are the team's *best guess* roadmaps based on the Ansible team's experience and are also based on requests and feedback from the community.
There are things that may not make it due to time constraints, lack of community maintainers, etc.
Each roadmap is published both as an idea of what is upcoming in Ansible, and as a medium for seeking further feedback from the community.
There are multiple places for you to submit feedback:
- Add to the agenda of an IRC `Core Team Meeting <https://github.com/ansible/community/blob/master/meetings/README.md>`_ (preferred)
- Ansible's google-group: ansible-devel
- AnsibleFest conferences
- IRC Freenode channel: #ansible-devel (this one may have things lost in lots of conversation)
For additional details consult the published `Ansible Roadmap <https://docs.ansible.com/ansible/devel/roadmap/>`_.
Authors
=======

@ -1,88 +0,0 @@
Ansible Releases at a Glance
============================
VERSION RELEASE CODE NAME
++++++++++++++++++++++++++++++
2.5.0 TBD "Kashmir"
2.4.3 01-31.2018 "Dancing Days"
2.4.2 11-29-2017 "Dancing Days"
2.4.1 10-25-2017 "Dancing Days"
2.4.0 09-19-2017 "Dancing Days"
2.3.2 2017-08-04 "Ramble On"
2.3.1 2017-06-01 "Ramble On"
2.3.0 2017-04-12 "Ramble On"
2.2.3 2017-05-09 "The Battle of Evermore"
2.2.2 2017-03-27 "The Battle of Evermore"
2.2.1 2017-01-16 "The Battle of Evermore"
2.2.0 2016-11-01 "The Battle of Evermore"
2.1.6 2017-06-01 "The Song Remains the Same"
2.1.5 2017-03-27 "The Song Remains the Same"
2.1.4 2017-01-16 "The Song Remains the Same"
2.1.3 2016-11-04 "The Song Remains the Same"
2.1.2 2016-09-29 "The Song Remains the Same"
2.1.1 2016-07-28 "The Song Remains the Same"
2.1.0 2016-05-25 "The Song Remains the Same"
2.0.2 2016-04-19 "Over the Hills and Far Away"
2.0.1 2016-02-24 "Over the Hills and Far Away"
2.0.0 2016-01-12 "Over the Hills and Far Away"
1.9.6 2016-04-15 "Dancing In the Streets"
1.9.5 2016-03-21 "Dancing In the Streets"
1.9.4 2015-10-09 "Dancing In the Streets"
1.9.3 2015-09-03 "Dancing In the Streets"
1.9.2 2015-06-24 "Dancing In the Streets"
1.9.1 2015-04-27 "Dancing In the Streets"
1.9.0 2015-03-25 "Dancing In the Streets"
1.8.4 2015-02-19 "You Really Got Me"
1.8.3 2015-02-17 "You Really Got Me"
1.8.2 2014-12-04 "You Really Got Me"
1.8.1 2014-11-26 "You Really Got Me"
1.8.0 2014-11-25 "You Really Got Me"
1.7.2 2014-09-24 "Summer Nights"
1.7.1 2014-08-14 "Summer Nights"
1.7.0 2014-08-06 "Summer Nights"
1.6.10 2014-07-25 "The Cradle Will Rock"
1.6.9 2014-07-24 "The Cradle Will Rock"
1.6.8 2014-07-22 "The Cradle Will Rock"
1.6.7 2014-07-21 "The Cradle Will Rock"
1.6.6 2014-07-01 "The Cradle Will Rock"
1.6.5 2014-06-25 "The Cradle Will Rock"
1.6.4 2014-06-25 "The Cradle Will Rock"
1.6.3 2014-06-09 "The Cradle Will Rock"
1.6.2 2014-05-23 "The Cradle Will Rock"
1.6.1 2014-05-07 "The Cradle Will Rock"
1.6.0 2014-05-05 "The Cradle Will Rock"
1.5.5 2014-04-18 "Love Walks In"
1.5.4 2014-04-01 "Love Walks In"
1.5.3 2014-03-13 "Love Walks In"
1.5.2 2014-03-11 "Love Walks In"
1.5.1 2014-03-10 "Love Walks In"
1.5.0 2014-02-28 "Love Walks In"
1.4.5 2014-02-12 "Could This Be Magic?"
1.4.4 2014-01-06 "Could This Be Magic?"
1.4.3 2013-12-20 "Could This Be Magic?"
1.4.2 2013-12-18 "Could This Be Magic?"
1.4.1 2013-11-27 "Could This Be Magic?"
1.4.0 2013-11-21 "Could This Be Magic?"
1.3.4 2013-10-29 "Top of the World"
1.3.3 2013-10-09 "Top of the World"
1.3.2 2013-09-19 "Top of the World"
1.3.1 2013-09-16 "Top of the World"
1.3.0 2013-09-13 "Top of the World"
1.2.3 2013-08-21 "Right Now"
1.2.2 2013-07-05 "Right Now"
1.2.1 2013-07-04 "Right Now"
1.2.0 2013-06-10 "Right Now"
1.1.0 2013-04-02 "Mean Street"
1.0.0 2013-02-01 "Eruption"
0.9.0 2012-11-30 "Dreams"
0.8.0 2012-10-19 "Cathedral"
0.7.0 2012-09-06 "Panama"
0.6.0 2012-08-06 "Cabo"
0.5.0 2012-07-04 "Amsterdam"
0.4.0 2012-05-23 "Unchained"
0.3.0 2012-04-23 "Baluchitherium"
0.2.0 ? "Untitled"
0.1.0 ? "Untitled"
0.0.2 ? "Untitled"
0.0.1 ? "Untitled"

@ -1,17 +0,0 @@
*******************************
Roadmap For Ansible by Red Hat
*******************************
This document is now the location for published Ansible Core roadmaps.
The roadmap will be updated by version. Based on team and community feedback, an initial roadmap will be published for a major or minor version (2.0, 2.1). Subminor versions will generally not have roadmaps published.
2.1 was the first time Ansible has published this and asked for feedback in this manner. So feedback on the roadmap and the new process is quite welcome. The team is aiming for further transparency and better inclusion of both community desires and submissions.
These roadmaps are the team's *best guess* roadmaps based on the Ansible team's experience and are also based on requests and feedback from the community. There are things that may not make it on due to time constraints, lack of community maintainers, etc. And there may be things that got missed, so each roadmap is published both as an idea of what is upcoming in Ansible, and as a medium for seeking further feedback from the community. Here are the good places for you to submit feedback:
- Add to the agenda of a `Core IRC Meetings <https://github.com/ansible/community/blob/master/meetings/README.md>`_ (preferred)
- Ansible's google-group: ansible-devel
- AnsibleFest conferences.
- IRC Freenode channel: #ansible-devel (this one may have things lost in lots of conversation, so a caution).
Ansible Roadmaps can be found `here <https://docs.ansible.com/ansible/devel/roadmap/>`_.

@ -1 +0,0 @@
2.6.0 0.0.devel

File diff suppressed because it is too large Load Diff

@ -0,0 +1,18 @@
---
release_tag_re: '(v(?:[\d.ab\-]|rc)+)'
pre_release_tag_re: '(?P<pre_release>(?:[ab]|rc)+\d*)$'
notesdir: fragments
prelude_section_name: release_summary
sections:
- ['major_changes', 'Major Changes']
- ['minor_changes', 'Minor Changes']
- ['deprecated_features', 'Deprecated Features']
- ['removed_features', 'Removed Features (previously deprecated)']
- ['new_lookup_plugins', 'New Lookup Plugins']
- ['new_callback_plugins', 'New Callback Plugins']
- ['new_connection_plugins', 'New Connection Plugins']
- ['new_test_plugins', 'New Test Plugins']
- ['new_filter_plugins', 'New Filter Plugins']
- ['new_modules', 'New Modules']
- ['bugfixes', 'Bugfixes']
- ['known_issues', 'Known Issues']

@ -1,7 +1,7 @@
'Hacking' directory tools
=========================
Env-setup
env-setup
---------
The 'env-setup' script modifies your environment to allow you to run
@ -21,7 +21,7 @@ can install them from pip
From there, follow ansible instructions on docs.ansible.com as normal.
Test-module
test-module
-----------
'test-module' is a simple program that allows module developers (or testers) to run
@ -55,19 +55,7 @@ return_skeleton_generator.py
return_skeleton_generator.py helps in generating the RETURNS section of a module. It takes
JSON output of a module provided either as a file argument or via stdin.
Module-formatter
----------------
The module formatter is a script used to generate manpages and online
module documentation. This is used by the system makefiles and rarely
needs to be run directly.
fix_test_syntax.py
------------------
A script to assist in the conversion for tests using filter syntax to proper jinja test syntax. This script has been used to convert all of the Ansible integration tests to the correct format for the 2.5 release. There are a few limitations documented, and all changes made by this script should be evaluated for correctness before executing the modified playbooks.
Authors
-------
'authors' is a simple script that generates a list of everyone who has
contributed code to the ansible repository.

@ -1,14 +0,0 @@
#!/bin/sh
# script from http://stackoverflow.com/questions/12133583
set -e
# Get a list of authors ordered by number of commits
# and remove the commit count column
AUTHORS=$(git --no-pager shortlog -nse --no-merges | cut -f 2- )
if [ -z "$AUTHORS" ] ; then
echo "Authors list was empty"
exit 1
fi
# Display the authors list and write it to the file
echo "$AUTHORS" | tee "$(git rev-parse --show-toplevel)/AUTHORS.TXT"

@ -1,3 +0,0 @@
#!/bin/sh
git pull --rebase
git submodule update --init --recursive

@ -1,16 +0,0 @@
#!/usr/bin/env python
# long version of this one liner: python -c 'import yaml,sys;yaml.safe_load(sys.stdin)' < yamltest.txt
import yaml
import sys
if len(sys.argv) > 1:
check_file = open(sys.argv[1])
else:
check_file = sys.stdin
try:
yaml.safe_load(check_file)
except yaml.scanner.ScannerError as e:
sys.exit('Invalid YAML:\n%s' % str(e))
print('valid YAML')

@ -21,3 +21,4 @@ __metaclass__ = type
__version__ = '2.6.0'
__author__ = 'Ansible, Inc.'
__codename__ = 'Heartbreaker'

@ -3,330 +3,3 @@ ansible (%VERSION%-%RELEASE%~%DIST%) %DIST%; urgency=low
* %VERSION% release
-- Ansible, Inc. <info@ansible.com> %DATE%
ansible (2.0.1.0) unstable; urgency=low
* 2.0.1.0
-- Ansible, Inc. <info@ansible.com> Wed, 24 Feb 2016 18:28:59 -0500
ansible (2.0.0.2) unstable; urgency=low
* 2.0.0.2
-- Ansible, Inc. <info@ansible.com> Thu, 14 Jan 2016 17:17:41 -0500
ansible (2.0.0.1) unstable; urgency=low
* 2.0.0.1
-- Ansible, Inc. <info@ansible.com> Tue, 12 Jan 2016 17:53:29 -0500
ansible (2.0.0.0) unstable; urgency=low
* 2.0.0.0
-- Ansible, Inc. <info@ansible.com> Tue, 12 Jan 2016 08:33:59 -0500
ansible (1.9.4) unstable; urgency=low
* 1.9.4
-- Ansible, Inc. <info@ansible.com> Fri, 09 Oct 2015 15:00:00 -0500
ansible (1.9.3) unstable; urgency=low
* 1.9.3
-- Ansible, Inc. <info@ansible.com> Thu, 03 Sep 2015 18:30:00 -0500
ansible (1.9.2) unstable; urgency=low
* 1.9.2
-- Ansible, Inc. <info@ansible.com> Wed, 24 Jun 2015 14:00:00 -0500
ansible (1.9.1) unstable; urgency=low
* 1.9.1
-- Ansible, Inc. <info@ansible.com> Mon, 27 Apr 2015 17:00:00 -0500
ansible (1.9.0.1) unstable; urgency=low
* 1.9.0.1
-- Ansible, Inc. <info@ansible.com> Wed, 25 Mar 2015 15:00:00 -0500
ansible (1.8.4) unstable; urgency=low
* 1.8.4
-- Ansible, Inc. <info@ansible.com> Thu, 19 Feb 2015 12:00:00 -0500
ansible (1.8.3) unstable; urgency=low
* 1.8.3
-- Ansible, Inc. <info@ansible.com> Tue, 17 Feb 2015 16:00:00 -0500
ansible (1.8.2) unstable; urgency=low
* 1.8.2
-- Michael DeHaan <michael@ansible.com> Thu, 04 Dec 2014 17:00:00 -0500
ansible (1.8.1) unstable; urgency=low
* 1.8.1
-- Michael DeHaan <michael@ansible.com> Wed, 26 Nov 2014 23:00:00 -0500
ansible (1.8.0) unstable; urgency=low
* 1.8.0
-- Michael DeHaan <michael@ansible.com> Tue, 25 Nov 2014 17:00:00 -0500
ansible (1.7.2) unstable; urgency=low
* 1.7.2 release
-- Michael DeHaan <michael@ansible.com> Wed, 24 Sep 2014 15:00:00 -0500
ansible (1.7.1) unstable; urgency=low
* 1.7.1 release
-- Michael DeHaan <michael@ansible.com> Thu, 14 Oct 2014 17:00:00 -0500
ansible (1.7) unstable; urgency=low
* 1.7.0 release
-- Michael DeHaan <michael@ansible.com> Wed, 06 Aug 2014 15:00:00 -0500
ansible (1.6.10) unstable; urgency=low
* 1.6.10 release
-- Michael DeHaan <michael@ansible.com> Fri, 25 Jul 2014 13:00:00 -0500
ansible (1.6.9) unstable; urgency=low
* 1.6.9 release
-- Michael DeHaan <michael@ansible.com> Thu, 24 Jul 2014 23:30:00 -0500
ansible (1.6.8) unstable; urgency=low
* 1.6.8 release
-- Michael DeHaan <michael@ansible.com> Tue, 22 Jul 2014 17:30:00 -0500
ansible (1.6.7) unstable; urgency=low
* 1.6.7 release
-- Michael DeHaan <michael@ansible.com> Mon, 21 Jul 2014 12:30:00 -0500
ansible (1.6.6) unstable; urgency=low
* 1.6.6 release
-- Michael DeHaan <michael@ansible.com> Tue, 01 Jul 2014 15:30:00 -0500
ansible (1.6.5) unstable; urgency=low
* 1.6.5 release
-- Michael DeHaan <michael@ansible.com> Wed, 25 Jun 2014 22:30:00 -0500
ansible (1.6.4) unstable; urgency=low
* 1.6.4 release
-- Michael DeHaan <michael@ansible.com> Wed, 25 Jun 2014 17:30:00 -0500
ansible (1.6.3) unstable; urgency=low
* 1.6.3 release
-- Michael DeHaan <michael@ansible.com> Mon, 09 Jun 2014 16:30:00 -0500
ansible (1.6.2) unstable; urgency=low
* 1.6.2 release
-- Michael DeHaan <michael@ansible.com> Fri, 23 May 2014 17:30:00 -0500
ansible (1.6.1) unstable; urgency=low
* 1.6.1 release
-- Michael DeHaan <michael@ansible.com> Wed, 07 May 2014 13:30:00 -0500
ansible (1.6) unstable; urgency=low
* 1.6.0 release
-- Michael DeHaan <michael@ansible.com> Mon, 05 May 2014 17:30:03 -0500
ansible (1.5.5) unstable; urgency=low
* 1.5.5 release
-- Michael DeHaan <michael@ansible.com> Fri, 18 April 2014 15:00:00 -0500
ansible (1.5.4) unstable; urgency=low
* 1.5.4 release
-- Michael DeHaan <michael@ansible.com> Tue, 01 April 2014 08:46:00 -0500
ansible (1.5.3) unstable; urgency=low
* 1.5.3 release
-- Michael DeHaan <michael@ansible.com> Thu, 13 March 2014 08:46:00 -0500
ansible (1.5.2) unstable; urgency=low
* 1.5.2 release
-- Michael DeHaan <michael@ansible.com> Tue, 11 March 2014 08:46:00 -0500
ansible (1.5.1) unstable; urgency=low
* 1.5.1 release
-- Michael DeHaan <michael@ansible.com> Mon, 10 March 2014 17:33:44 -0500
ansible (1.5) unstable; urgency=low
* 1.5 release
-- Michael DeHaan <michael@ansible.com> Fri, 28 February 2014 00:00:00 -0500
ansible (1.4.5) unstable; urgency=low
* 1.4.5 release
-- Michael DeHaan <michael.dehaan@gmail.com> Wed, 12 February 2014 15:23:11 -0500
ansible (1.4.4) unstable; urgency=low
* 1.4.4 release
-- Michael DeHaan <michael.dehaan@gmail.com> Mon, 06 January 2014 10:30:34 -0500
ansible (1.4.3) unstable; urgency=low
* 1.4.3 release
-- Michael DeHaan <michael.dehaan@gmail.com> Fri, 20 December 2013 13:19:01 -0500
ansible (1.4.2) unstable; urgency=low
* 1.4.2 release
-- Michael DeHaan <michael.dehaan@gmail.com> Wed, 18 December 2013 19:00:00 -0500
ansible (1.4.1) unstable; urgency=low
* 1.4.1 release
-- Michael DeHaan <michael.dehaan@gmail.com> Wed, 27 November 2013 15:00:01 -0500
ansible (1.4) unstable; urgency=low
* 1.4 release
-- Michael DeHaan <michael.dehaan@gmail.com> Thu, 21 November 2013 15:00:01 -0500
ansible (1.3) unstable; urgency=low
* 1.3 release
-- Michael DeHaan <michael.dehaan@gmail.com> Fri, 13 September 2013 18:00:00 -0500
ansible (1.2.2) unstable; urgency=low
* 1.2.2 release
-- Michael DeHaan <michael.dehaan@gmail.com> Thu, 04 July 2013 21:45:01 -0500
ansible (1.2.1) unstable; urgency=low
* 1.2.1 release
-- Michael DeHaan <michael.dehaan@gmail.com> Thu, 04 July 2013 21:45:00 -0500
ansible (1.2) unstable; urgency=low
* 1.2 release
-- Michael DeHaan <michael.dehaan@gmail.com> Mon, 10 June 2013 15:00:00 -0500
ansible (1.1) unstable; urgency=low
* 1.1 release
-- Michael DeHaan <michael.dehaan@gmail.com> Tue, 02 Mar 2013 20:38:00 -0500
ansible (1.0) unstable; urgency=low
* 1.0 release
-- Michael DeHaan <michael.dehaan@gmail.com> Fri, 01 Feb 2013 21:34:34 -0500
ansible (0.9) unstable; urgency=low
* 0.9 release
-- Michael DeHaan <michael.dehaan@gmail.com> Fri, 30 Nov 2012 22:00:00 -0400
ansible (0.8) unstable; urgency=low
* 0.8 update
-- Michael DeHaan <michael.dehaan@gmail.com> Fri, 19 Oct 2012 20:50:00 -0400
ansible (0.7) unstable; urgency=low
* 0.7 update
-- Michael DeHaan <michael.dehaan@gmail.com> Thu, 06 Aug 2012 18:50:00 -0400
ansible (0.6) unstable; urgency=low
* 0.6 update
-- Michael DeHaan <michael.dehaan@gmail.com> Mon, 06 Aug 2012 19:50:00 -0400
ansible (0.5) unstable; urgency=low
* 0.5 update
-- Michael DeHaan <michael.dehaan@gmail.com> Wed, 04 Jul 2012 13:40:00 -0400
ansible (0.4) unstable; urgency=low
* 0.4 update
-- Michael DeHaan <michael.dehaan@gmail.com> Wed, 23 May 2012 19:40:00 -0400
ansible (0.3) unstable; urgency=low
* 0.3 update
-- Michael DeHaan <michael.dehaan@gmail.com> Mon, 23 Apr 2012 11:08:00 -0400
ansible (0.0.2) unstable; urgency=low
* Initial Release
-- Henry Graham (hzgraham) <Henry.Graham@mail.wvu.edu> Tue, 17 Apr 2012 17:17:01 -0400

@ -1,210 +0,0 @@
- hosts: localhost
gather_facts: no
vars_files:
- vars/versions.yml
vars:
release_dir: "./ansible_release"
release_date: "{{lookup('pipe', 'date +\"%m-%d-%Y\"')}}"
rpm_spec_line: |
* {{lookup('pipe', 'date +"%a %b %d %Y"')}} Ansible, Inc. <info@ansible.com> - {{ansible_release_version}}-{{ansible_release_string}}
- Release {{ansible_release_version}}-{{ansible_release_string}}
deb_changelog_line: |
ansible ({{ansible_release_version}}) unstable; urgency=low
* {{ansible_release_version}}
-- Ansible, Inc. <info@ansible.com> {{lookup('pipe', 'date -R')}}
vars_prompt:
- name: ansible_release_branch
prompt: "Enter the release branch"
private: no
- name: ansible_release_version
prompt: "Enter the release version"
private: no
- name: ansible_release_string
prompt: "Enter the release string (ie. 0.1.beta1, or just 1 for final releases)"
private: no
#- name: ansible_release_codename
# prompt: "Enter the release code name (only used if doing a final release)"
# default: ""
# private: no
- name: has_submodules
prompt: "Does this branch have git submodules?"
default: "no"
private: no
- name: is_final
prompt: "Is this a final release (not a beta/rc)?"
default: "no"
private: no
- name: do_push
prompt: "Push repositories upstream when done?"
default: "no"
private: no
tasks:
- pause:
prompt: "Has the CHANGELOG.md, versions.yml, release_and_maintenance.rst, and any other files been updated and are ready to go?"
when: is_final|bool
- name: create a combined version string from the specified values
set_fact:
new_version: "v{{ansible_release_version}}-{{ansible_release_string}}"
- name: assert certain variables are defined
assert:
that:
- ansible_release_branch is defined
- ansible_release_version is defined
- ansible_release_string is defined
- name: Remove ansible_release (if it exists)
file:
path: "{{release_dir}}/"
state: absent
- name: Clone the official repo
git:
#repo: "git@github.com:ansible/ansible.git"
repo: "https://github.com/ansible/ansible.git"
dest: "{{release_dir}}"
version: "{{ansible_release_branch}}"
recursive: yes
- name: get the latest version
shell:
_raw_params: git tag | tail -1
chdir: "{{release_dir}}"
register: latest_version
- name: "assert the specified version ({{new_version}}) is greater than the latest version ({{latest_version.stdout}})"
assert:
that:
- new_version is version(latest_version.stdout, "gt")
ignore_errors: yes
- name: Update the VERSION file for the main repo
copy:
dest: "{{release_dir}}/VERSION"
content: "{{ansible_release_version}} {{ansible_release_string}}\n"
- name: Update the library version
lineinfile:
dest: "{{release_dir}}/lib/ansible/release.py"
regexp: "^__version__ ="
line: "__version__ = '{{ansible_release_version}}'"
- block:
- name: Update the spec file release list
lineinfile:
dest: "{{release_dir}}/packaging/rpm/ansible.spec"
regexp: "^- Release {{ansible_release_version}}-{{ansible_release_string}}"
line: "{{rpm_spec_line.rstrip()}}"
insertafter: "^%changelog"
- name: Update the deb changelog file
lineinfile:
dest: "{{release_dir}}/packaging/debian/changelog"
regexp: "^ansible ({{ansible_release_version}})"
line: "{{deb_changelog_line}}"
insertafter: "-- Ansible, Inc. <info@ansible.com> %DATE%"
- name: Update RELEASES.txt
template:
dest: "{{release_dir}}/RELEASES.txt"
src: "templates/RELEASES.tmpl"
when: is_final|bool
- name: "Make sure modules are checked out to {{ansible_release_branch}}"
shell:
_raw_params: "git checkout {{ansible_release_branch}}"
chdir: "{{release_dir}}/lib/ansible/modules/{{item}}/"
with_items:
- core
- extras
when: has_submodules|bool
- name: Update the VERSION file for the modules
copy:
dest: "{{release_dir}}/lib/ansible/modules/{{item}}/VERSION"
content: "{{ansible_release_version}} {{ansible_release_string}}\n"
with_items:
- core
- extras
when: has_submodules|bool
- name: Add and commit the updated files for the core modules
shell:
_raw_params: "git add ./ && git commit -m 'New release {{new_version}}'"
chdir: "{{release_dir}}/lib/ansible/modules/{{item}}/"
with_items:
- core
- extras
when: has_submodules|bool
- name: Add and commit the updated files for the main repo
shell:
_raw_params: "git add ./ && git commit -m 'New release {{new_version}}'"
chdir: "{{release_dir}}/"
- name: Tag the release
shell:
_raw_params: "git tag -fa {{new_version}} -m 'New release {{new_version}}'"
chdir: "{{release_dir}}/"
- name: update git config for the main repo
lineinfile:
dest: "{{release_dir}}/.git/config"
regexp: "upstream"
line: |
[remote "upstream"]
url = git@github.com:ansible/ansible.git
fetch = +refs/heads/*:refs/remotes/origin/*
- name: update git config for submodules
lineinfile:
dest: "{{release_dir}}/.git/modules/lib/ansible/modules/{{item}}/config"
regexp: "submodule_upstream"
line: |
[remote "submodule_upstream"]
url = git@github.com:ansible/ansible-modules-{{item}}.git
fetch = +refs/heads/*:refs/remotes/origin/*
with_items:
- core
- extras
when: has_submodules|bool
- name: create the dist tar.gz
command:
_raw_params: make sdist
chdir: "{{release_dir}}/"
environment:
OFFICIAL: yes
- name: rename the dist tar.gz to include the full release
command:
_raw_params: "mv dist/ansible-{{ansible_release_version}}.tar.gz dist/ansible-{{ansible_release_version}}-{{ansible_release_string}}.tar.gz"
chdir: "{{release_dir}}/"
- name: generate the SHA file for the tar.gz
shell:
_raw_params: "sha256sum dist/ansible-{{ansible_release_version}}-{{ansible_release_string}}.tar.gz > dist/ansible-{{ansible_release_version}}-{{ansible_release_string}}.tar.gz.sha"
chdir: "{{release_dir}}/"
- block:
- pause:
prompt: "Ready to push, this is the last chance to abort..."
- name: Push the submodule repos
shell:
_raw_params: "git push submodule_upstream {{ansible_release_branch}}"
chdir: "{{release_dir}}/lib/ansible/modules/{{item}}/"
with_items:
- core
- extras
when: has_submodules|bool
- name: Push the updates and/or tag
shell:
_raw_params: "git push --tags upstream {{ansible_release_branch}}"
chdir: "{{release_dir}}/lib/ansible/modules/{{item}}/"
when: do_push|bool

@ -1,16 +0,0 @@
Ansible Releases at a Glance
============================
VERSION RELEASE CODE NAME
++++++++++++++++++++++++++++++
{% for version in versions %}
{% for vkey, vdata in version.items() %}
{% for release in vdata.releases %}
{% for rkey, rdata in release.items() %}
{% set major_minor = vkey + "." + rkey %}
{{"%-8s"|format(major_minor)}} {{"%-10s"|format(rdata)}} "{{vdata.code_name}}"
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}

@ -0,0 +1,42 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import pytest
from packaging.version import InvalidVersion
from versionhelper.version_helper import AnsibleVersionMunger
@pytest.mark.parametrize('version,revision,codename,output_propname,expected', [
('2.5.0dev1', None, None, 'raw', '2.5.0dev1'),
('2.5.0', None, None, 'raw', '2.5.0'),
('2.5.0dev1', None, None, 'major_version', '2.5'),
('2.5.0', None, None, 'major_version', '2.5'),
('2.5.0dev1', None, None, 'base_version', '2.5.0'),
('2.5.0', None, None, 'base_version', '2.5.0'),
('2.5.0dev1', None, None, 'deb_version', '2.5.0~dev1'),
('2.5.0b1', None, None, 'deb_version', '2.5.0~b1'),
('2.5.0', None, None, 'deb_version', '2.5.0'),
('2.5.0dev1', None, None, 'deb_release', '1'),
('2.5.0b1', 2, None, 'deb_release', '2'),
('2.5.0dev1', None, None, 'rpm_release', '0.1.dev1'),
('2.5.0a1', None, None, 'rpm_release', '0.101.a1'),
('2.5.0b1', None, None, 'rpm_release', '0.201.b1'),
('2.5.0rc1', None, None, 'rpm_release', '0.1001.rc1'),
('2.5.0rc1', '0.99', None, 'rpm_release', '0.99.rc1'),
('2.5.0.rc.1', None, None, 'rpm_release', '0.1001.rc.1'),
('2.5.0', None, None, 'rpm_release', '1'),
('2.5.0', 2, None, 'rpm_release', '2'),
('2.5.0', None, None, 'codename', 'UNKNOWN'),
('2.5.0', None, 'LedZeppelinSongHere', 'codename', 'LedZeppelinSongHere'),
('2.5.0x1', None, None, None, InvalidVersion)
])
def test_output_values(version, revision, codename, output_propname, expected):
try:
v = AnsibleVersionMunger(version, revision, codename)
assert getattr(v, output_propname) == expected
except Exception as ex:
if isinstance(expected, type):
assert isinstance(ex, expected)
else:
raise

@ -1,167 +0,0 @@
versions:
- "2.6":
code_name: "Heartbreaker"
releases:
- "0": TBD
- "2.5":
code_name: "Kashmir"
releases:
- "0": TBD
- "2.4":
code_name: "Dancing Days"
releases:
- "4": "04-04-2018"
- "3": "01-31.2018"
- "2": "11-29-2017"
- "1": "10-25-2017"
- "0": "09-19-2017"
- "2.3":
code_name: "Ramble On"
releases:
- "3": "12-20-2017"
- "2": "08-04-2017"
- "1": "06-01-2017"
- "0": "04-12-2017"
- "2.2":
code_name: "The Battle of Evermore"
releases:
- "3": "05-09-2017"
- "2": "03-27-2017"
- "1": "01-16-2017"
- "0": "11-01-2016"
- "2.1":
code_name: "The Song Remains the Same"
releases:
- "6": "06-01-2017"
- "5": "03-27-2017"
- "4": "01-16-2017"
- "3": "11-04-2016"
- "2": "09-29-2016"
- "1": "07-28-2016"
- "0": "05-25-2016"
- "2.0":
code_name: "Over the Hills and Far Away"
releases:
- '2': "04-19-2016"
- '1': "02-24-2016"
- '0': "01-12-2016"
- "1.9":
code_name: "Dancing In the Streets"
releases:
- '6': "04-15-2016"
- '5': "03-21-2016"
- '4': "10-09-2015"
- '3': "09-03-2015"
- '2': "06-24-2015"
- '1': "04-27-2015"
- '0': "03-25-2015"
- "1.8":
code_name: "You Really Got Me"
releases:
- '4': "02-19-2015"
- '3': "02-17-2015"
- '2': "12-04-2014"
- '1': "11-26-2014"
- '0': "11-25-2014"
- "1.7":
code_name: "Summer Nights"
releases:
- '2': "09-24-2014"
- '1': "08-14-2014"
- '0': "08-06-2014"
- "1.6":
code_name: "The Cradle Will Rock"
releases:
- '10': "07-25-2014"
- '9': "07-24-2014"
- '8': "07-22-2014"
- '7': "07-21-2014"
- '6': "07-01-2014"
- '5': "06-25-2014"
- '4': "06-25-2014"
- '3': "06-09-2014"
- '2': "05-23-2014"
- '1': "05-07-2014"
- '0': "05-05-2014"
- "1.5":
code_name: "Love Walks In"
releases:
- '5': "04-18-2014"
- '4': "04-01-2014"
- '3': "03-13-2014"
- '2': "03-11-2014"
- '1': "03-10-2014"
- '0': "02-28-2014"
- "1.4":
code_name: "Could This Be Magic?"
releases:
- '5': "02-12-2014"
- '4': "01-06-2014"
- '3': "12-20-2013"
- '2': "12-18-2013"
- '1': "11-27-2013"
- '0': "11-21-2013"
- "1.3":
code_name: "Top of the World"
releases:
- '4': "10-29-2013"
- '3': "10-09-2013"
- '2': "09-19-2013"
- '1': "09-16-2013"
- '0': "09-13-2013"
- "1.2":
code_name: "Right Now"
releases:
- '3': "08-21-2013"
- '2': "07-05-2013"
- '1': "07-04-2013"
- '0': "06-10-2013"
- "1.1":
code_name: "Mean Street"
releases:
- '0': "04-02-2013"
- "1.0":
code_name: "Eruption"
releases:
- '0': "02-01-2013"
- "0.9":
code_name: "Dreams"
releases:
- '0': "11-30-2012"
- "0.8":
code_name: "Cathedral"
releases:
- '0': "10-19-2012"
- "0.7":
code_name: "Panama"
releases:
- '0': "09-06-2012"
- "0.6":
code_name: "Cabo"
releases:
- '0': "08-06-2012"
- "0.5":
code_name: "Amsterdam"
releases:
- '0': "07-04-2012"
- "0.4":
code_name: "Unchained"
releases:
- '0': "05-23-2012"
- "0.3":
code_name: "Baluchitherium"
releases:
- '0': "04-23-2012"
- "0.2":
code_name: "Untitled"
releases:
- '0': "?"
- "0.1":
code_name: "Untitled"
releases:
- '0': "?"
- "0.0":
code_name: "Untitled"
releases:
- '2': "?"
- '1': "?"

@ -0,0 +1,182 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import argparse
import os
import re
import sys
from packaging.version import Version, VERSION_PATTERN
class AnsibleVersionMunger(object):
tag_offsets = dict(
dev=0,
a=100,
b=200,
rc=1000
)
# TODO: allow overrides here for packaging bump etc
def __init__(self, raw_version, revision=None, codename=None):
self._raw_version = raw_version
self._revision = revision
self._parsed_version = Version(raw_version)
self._codename = codename
self._parsed_regex_match = re.match(VERSION_PATTERN, raw_version, re.VERBOSE | re.IGNORECASE)
@property
def deb_version(self):
v = self._parsed_version
match = self._parsed_regex_match
if v.is_prerelease:
if match.group('pre'):
tag_value = match.group('pre')
tag_type = match.group('pre_l')
tag_ver = match.group('pre_n')
elif match.group('dev'):
tag_type = "dev"
tag_value = match.group('dev')
tag_ver = match.group('dev_n')
else:
raise Exception("unknown prerelease type for version {0}".format(self._raw_version))
elif v.is_postrelease:
raise Exception("post-release identifiers are not supported")
else:
tag_type = None
tag_value = ''
tag_ver = 0
# not a pre/post/dev release, just return base version
if not tag_type:
return '{base_version}'.format(base_version=self.base_version)
# it is a pre/dev release, include the tag value with a ~
return '{base_version}~{tag_value}'.format(base_version=self.base_version, tag_value=tag_value)
@property
def deb_release(self):
return '1' if self._revision is None else str(self._revision)
@property
def rpm_release(self):
v = self._parsed_version
match = self._parsed_regex_match
if v.is_prerelease:
if match.group('pre'):
tag_value = match.group('pre')
tag_type = match.group('pre_l')
tag_ver = match.group('pre_n')
elif match.group('dev'):
tag_type = "dev"
tag_value = match.group('dev')
tag_ver = match.group('dev_n')
else:
raise Exception("unknown prerelease type for version {0}".format(self._raw_version))
elif v.is_postrelease:
raise Exception("post-release identifiers are not supported")
else:
tag_type = None
tag_value = ''
tag_ver = 0
# not a pre/post/dev release, just append revision (default 1)
if not tag_type:
if self._revision is None:
self._revision = 1
return '{revision}'.format(revision=self._revision)
# cleanse tag value in case it starts with .
tag_value = tag_value.strip('.')
# coerce to int and None == 0
tag_ver = int(tag_ver if tag_ver else 0)
if self._revision is None:
tag_offset = self.tag_offsets.get(tag_type)
if tag_offset is None:
raise Exception('no tag offset defined for tag {0}'.format(tag_type))
pkgrel = '0.{0}'.format(tag_offset + tag_ver)
else:
pkgrel = self._revision
return '{pkgrel}.{tag_value}'.format(pkgrel=pkgrel, tag_value=tag_value)
@property
def raw(self):
return self._raw_version
# return the x.y.z version without any other modifiers present
@property
def base_version(self):
return self._parsed_version.base_version
# return the x.y version without any other modifiers present
@property
def major_version(self):
return re.match(r'^(\d+.\d+)', self._raw_version).group(1)
@property
def codename(self):
return self._codename if self._codename else "UNKNOWN"
def main():
parser = argparse.ArgumentParser(description='Extract/transform Ansible versions to various packaging formats')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--raw', action='store_true')
group.add_argument('--majorversion', action='store_true')
group.add_argument('--baseversion', action='store_true')
group.add_argument('--debversion', action='store_true')
group.add_argument('--debrelease', action='store_true')
group.add_argument('--rpmrelease', action='store_true')
group.add_argument('--codename', action='store_true')
group.add_argument('--all', action='store_true')
parser.add_argument('--revision', action='store', default='auto')
args = parser.parse_args()
mydir = os.path.dirname(__file__)
release_loc = os.path.normpath(mydir + '/../../../lib')
sys.path.insert(0, release_loc)
from ansible import release
rev = None
if args.revision != 'auto':
rev = args.revision
v_raw = release.__version__
codename = release.__codename__
v = AnsibleVersionMunger(v_raw, revision=rev, codename=codename)
if args.raw:
print(v.raw)
elif args.baseversion:
print(v.base_version)
elif args.majorversion:
print(v.major_version)
elif args.debversion:
print(v.deb_version)
elif args.debrelease:
print(v.deb_release)
elif args.rpmrelease:
print(v.rpm_release)
elif args.codename:
print(v.codename)
elif args.all:
props = [name for (name, impl) in vars(AnsibleVersionMunger).items() if isinstance(impl, property)]
for propname in props:
print('{0}: {1}'.format(propname, getattr(v, propname)))
if __name__ == '__main__':
main()

@ -1,18 +1,18 @@
%define name ansible
%define ansible_version $VERSION
%define release_date %(date "+%a %b %e %Y")
%if 0%{?rhel} == 5
%define __python2 /usr/bin/python26
%endif
Name: %{name}
Version: %{ansible_version}
Release: 1%{?dist}
Version: %{rpmversion}
Release: %{rpmrelease}%{?dist}%{?repotag}
Url: https://www.ansible.com
Summary: SSH-based application deployment, configuration management, and IT orchestration platform
License: GPLv3+
Group: Development/Libraries
Source: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz
Source: https://releases.ansible.com/ansible/%{name}-%{upstream_version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%{!?__python2: %global __python2 /usr/bin/python2.6}
%{!?python_sitelib: %global python_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@ -87,7 +87,7 @@ on remote nodes. Extension modules can be written in any language and
are transferred to managed machines automatically.
%prep
%setup -q
%setup -q -n %{name}-%{upstream_version}
%build
%{__python2} setup.py build
@ -128,175 +128,10 @@ rm -rf %{buildroot}
%{_bindir}/ansible*
%dir %{_datadir}/ansible
%config(noreplace) %{_sysconfdir}/ansible
%doc README.rst PKG-INFO COPYING CHANGELOG.md
%doc README.rst PKG-INFO COPYING changelogs/CHANGELOG-*.rst
%doc %{_mandir}/man1/ansible*
%changelog
* Wed Feb 24 2016 Ansible, Inc. <info@ansible.com> - 2.0.1.0-1
- Release 2.0.1.0-1
* Thu Jan 14 2016 Ansible, Inc. <info@ansible.com> - 2.0.0.2-1
- Release 2.0.0.2-1
* Tue Jan 12 2016 Ansible, Inc. <info@ansible.com> - 2.0.0.1-1
- Release 2.0.0.1-1
* Tue Jan 12 2016 Ansible, Inc. <info@ansible.com> - 2.0.0.0-1
- Release 2.0.0.0-1
* Fri Oct 09 2015 Ansible, Inc. <info@ansible.com> - 1.9.4
- Release 1.9.4
* Thu Sep 03 2015 Ansible, Inc. <info@ansible.com> - 1.9.3
- Release 1.9.3
* Wed Jun 24 2015 Ansible, Inc. <info@ansible.com> - 1.9.2
- Release 1.9.2
* Mon Apr 27 2015 Ansible, Inc. <info@ansible.com> - 1.9.1
- Release 1.9.1
* Wed Mar 25 2015 Ansible, Inc. <info@ansible.com> - 1.9.0
- Release 1.9.0
* Thu Feb 19 2015 Ansible, Inc. <info@ansible.com> - 1.8.4
- Release 1.8.4
* Tue Feb 17 2015 Ansible, Inc. <info@ansible.com> - 1.8.3
- Release 1.8.3
* Thu Dec 04 2014 Michael DeHaan <michael@ansible.com> - 1.8.2
- Release 1.8.2
* Wed Nov 26 2014 Michael DeHaan <michael@ansible.com> - 1.8.1
- Release 1.8.1
* Tue Nov 25 2014 Michael DeHaan <michael@ansible.com> - 1.8.0
- Release 1.8.0
* Wed Sep 24 2014 Michael DeHaan <michael@ansible.com> - 1.7.2
- Release 1.7.2
* Thu Aug 14 2014 Michael DeHaan <michael@ansible.com> - 1.7.1
- Release 1.7.1
* Wed Aug 06 2014 Michael DeHaan <michael@ansible.com> - 1.7.0
- Release 1.7.0
* Fri Jul 25 2014 Michael DeHaan <michael@ansible.com> - 1.6.10
- Release 1.6.10
* Thu Jul 24 2014 Michael DeHaan <michael@ansible.com> - 1.6.9
- Release 1.6.9
* Tue Jul 22 2014 Michael DeHaan <michael@ansible.com> - 1.6.8
- Release 1.6.8
* Mon Jul 21 2014 Michael DeHaan <michael@ansible.com> - 1.6.7
- Release 1.6.7
* Tue Jul 01 2014 Michael DeHaan <michael@ansible.com> - 1.6.6
- Release 1.6.6
* Wed Jun 25 2014 Michael DeHaan <michael@ansible.com> - 1.6.5
- Release 1.6.5
* Wed Jun 25 2014 Michael DeHaan <michael@ansible.com> - 1.6.4
- Release 1.6.4
* Mon Jun 09 2014 Michael DeHaan <michael@ansible.com> - 1.6.3
- Release 1.6.3
* Fri May 23 2014 Michael DeHaan <michael@ansible.com> - 1.6.2
- Release 1.6.2
* Wed May 07 2014 Michael DeHaan <michael@ansible.com> - 1.6.1
- Release 1.6.1
* Mon May 05 2014 Michael DeHaan <michael@ansible.com> - 1.6.0
- Release 1.6.0
* Fri Apr 18 2014 Michael DeHaan <michael@ansible.com> - 1.5.5
- Release 1.5.5
* Tue Apr 01 2014 Michael DeHaan <michael@ansible.com> - 1.5.4
- Release 1.5.4
* Thu Mar 13 2014 Michael DeHaan <michael@ansible.com> - 1.5.3
- Release 1.5.3
* Tue Mar 11 2014 Michael DeHaan <michael@ansible.com> - 1.5.2
- Release 1.5.2
* Mon Mar 10 2014 Michael DeHaan <michael@ansible.com> - 1.5.1
- Release 1.5.1
* Fri Feb 28 2014 Michael DeHaan <michael@ansible.com> - 1.5.0
- Release 1.5.0
* Fri Feb 28 2014 Michael DeHaan <michael.dehaan@gmail.com> - 1.5-0
* Release 1.5
* Wed Feb 12 2014 Michael DeHaan <michael.dehaan@gmail.com> - 1.4.5
* Release 1.4.5
* Mon Jan 06 2014 Michael DeHaan <michael.dehaan@gmail.com> - 1.4.4
* Release 1.4.4
* Fri Dec 20 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.4.3
* Release 1.4.3
* Wed Dec 18 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.4.2
* Release 1.4.2
* Wed Nov 27 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.4-1
* Release 1.4.1
* Thu Nov 21 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.4-0
* Release 1.4.0
* Fri Sep 13 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.3-0
* Release 1.3.0
* Fri Jul 05 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.2-2
* Release 1.2.2
* Thu Jul 04 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.2-1
* Release 1.2.1
* Mon Jun 10 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.2-0
* Release 1.2
* Tue Apr 2 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.1-0
* Release 1.1
* Fri Feb 1 2013 Michael DeHaan <michael.dehaan@gmail.com> - 1.0-0
- Release 1.0
* Fri Nov 30 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.9-0
- Release 0.9
* Fri Oct 19 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.8-0
- Release of 0.8
* Mon Aug 6 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.7-0
- Release of 0.7
* Mon Aug 6 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.6-0
- Release of 0.6
* Wed Jul 4 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.5-0
- Release of 0.5
* Wed May 23 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.4-0
- Release of 0.4
* Mon Apr 23 2012 Michael DeHaan <michael.dehaan@gmail.com> - 0.3-1
- Release of 0.3
* Tue Apr 3 2012 John Eckersberg <jeckersb@redhat.com> - 0.0.2-1
- Release of 0.0.2
* Sat Mar 10 2012 <tbielawa@redhat.com> - 0.0.1-1
- Release of 0.0.1
* %{release_date} Ansible, Inc. <info@ansible.com> - %{rpmversion}-%{rpmrelease}
- Release %{rpmversion}-%{rpmrelease}

Loading…
Cancel
Save