Commit Graph

9 Commits (fdeda6f03f31bba7b3350c29d836ffed36e3f3f4)

Author SHA1 Message Date
Guillaume Abrioux 01701eed96 Makefile: followup on #2585
Fix a typo in `tag` target, double quote are missing here.

Without them, the `make tag` command fails like this:

```
if [[ "v3.0.35" ==  ]]; then \
            echo "e5f2df8 on stable-3.0 is already tagged as v3.0.35"; \
            exit 1; \
        fi
/bin/sh: -c: line 0: unexpected argument `]]' to conditional binary operator
/bin/sh: -c: line 0: syntax error near `;'
/bin/sh: -c: line 0: `if [[ "v3.0.35" ==  ]]; then     echo "e5f2df8 on stable-3.0 is already tagged as v3.0.35";     exit 1; fi'
make: *** [tag] Error 2
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 0b67f42feb)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-06-01 12:51:53 +02:00
Ken Dreyer b035697246 Makefile: add "make tag" command
Add a new "make tag" command. This automates some common operations:

1) Automatically determine the next Git tag version number to create.
   For example:
   "3.2.0beta1 -> "3.2.0beta2"
   "3.2.0rc1 -> "3.2.0rc2"
   "3.2.0" -> "3.2.1"

2) Create the Git tag, and print instructions for the user to push it to
   GitHub.

3) Sanity check that HEAD is a stable-* branch or master (bail on
   everything else).

4) Sanity check that HEAD is not already tagged.

Note, we will still need to tag manually once each time we change the
format, for example when moving from tagging "betas" to tagging "rcs",
or "rcs" to "stable point releases".

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Co-authored-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit fcea568495)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2018-05-31 11:15:12 +02:00
Ken Dreyer 752bf3e39c Makefile: handle "beta" Git tags
With this change, "make srpm" will generate an RPM with "beta" in the
Release value.

For example, "v3.2.0beta1" will create
"ceph-ansible-3.2.0-0.beta1.1.el7.src.rpm"
2018-01-12 14:45:19 +01:00
Ken Dreyer 323d59b786 Makefile: remove fedpkg dependency for "srpm"
It's not currently possible to install EPEL 7's fedpkg alongside the
centos-packager package in CentOS 7 Extras (for /usr/bin/cbs), because
they each depend on slightly different Koji package versions.

This means that we cannot run "make srpm" on a system where
centos-packager is installed, because that depends on fedpkg.

Remove the dependency on fedpkg for the "srpm" target, and run
rpmbuild -bs directly.

The purpose of this change is to make it easier to automatically
build ceph-ansible SRPMs in Jenkins/cbs.centos.org.
2017-09-13 10:46:37 -06:00
Ken Dreyer 08a87e59e4 Makefile: handle "rc" version tags
When "git describe" returns an "rc" tag (eg "2.2.0rc1"), insert the RC
number into the RPM's "Release" field.

Add comments with some git-describe values and NVRs.
2017-03-07 11:16:11 -07:00
Ken Dreyer db241751db Makefile: generate tagged RPMs with "-1" release value
Prior to this change, if we built an RPM from a tagged commit, the RPM
would have a release value of "0".

This causes some problems with RPM version comparisons when comparing
version numbers with "rc" tags/packages, which should also have a
less-than-one Release value.
2017-03-07 11:11:53 -07:00
Ken Dreyer 20e7bad984 Makefile: improve version detection
Prior to this change, if there was a stray tag in the repository that
did not start with a "v", the Makefile would still try to use that tag
as a version tag when constructing the RPMs.

Only use the tags that start with "v", in this case.
2016-12-12 14:22:29 -07:00
Ken Dreyer cda441595b Makefile: strip "v" from RPM versions
Prior to this change, all RPMs would have a Version field that started
with "v", for example "ceph-ansible-v2.0.0-163.g2c98b1d.el7"

Strip the "v" out in these cases, so that the version is simply a
number.
2016-12-12 14:22:08 -07:00
Ken Dreyer a8557b0a83 add RPM packaging for CI
"make rpm" will build a ceph-ansible RPM and place it in the current
working directory.

This will allow us to run this command in Jenkins for every branch.
2016-11-17 15:23:44 -07:00