• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wooga / atlas-version / 14
76%

Build:
DEFAULT BRANCH: master
Ran 03 Jun 2020 10:25AM UTC
Jobs 4
Files 21
Run time 946314min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
14

push

jenkins

Add versionCode generation (#7)

Description
===========

This patch adds multiple schemes to generate or manual set a
versionCode. The strategies differ in two major ways:

semver version based
--------------------

A strategy based on a `semver` version number. This patch provides two
`schemes` to generate a version code from a given semver version string:

_`semverBasic`_

This scheme turns a semver version `major.minor.patch` into a integer
representation. Everything after the components is ignored. The version
components are not allowed to be higher than `99` This means that the
biggest version provided possible is `99.99.99`.
The resulting code is an integer with padded values.

`1.0.0`   => `10000`
`1.1.1`   => `10101`
`1.11.10` => `11110`

_`semver`_

The `semver` scheme is an opinionated addon to the `semverBasic` scheme.
The resulting code is extended by a revision counter. This counter has
only one digit so can't be higher than `9`. The revision is parsed from
a version with `-staging.{revision}` appended.

`1.0.0`           => `100000`
`1.0.0-staging.3` => `100003

release count based
-------------------

These schemes act more as a build number generator by counting all
reachable release tags from the current branch. An optional `offset` can
be provided to keep the generated version-code over a certain limit.

_`releaseCountBasic`_

Counts all reachable tags in the repo with final release versions
appended (e.g `v1.1.0`). It will skip any prerelease tags or any other
tags.

_ `releaseCount`_

Counts all kinds of release tags reachable from the current branch.
(e.g. `v1.1.0`, `v1.2.0-staging.1`)

configuration
-------------

*build.gradle*

```groovy
plugins {
    id "net.wooga.version" version "VERSION"
}

versionBuilder {
   versionScheme = "semver2"
   versionCodeScheme = "releaseCount"
   versionCodeOffset = 1000
}
```

You can also manually set a versionCode. This ha... (continued)

417 of 509 relevant lines covered (81.93%)

2.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 14.1 03 Jun 2020 10:25AM UTC 0
81.93
2 14.2 03 Jun 2020 10:26AM UTC 0
81.93
3 14.3 03 Jun 2020 10:30AM UTC 0
81.93
4 14.4 22 Mar 2022 02:18PM UTC 0
76.06
Source Files on build 14
Detailed source file information is not available for this build.
  • Back to Repo
  • Jenkins Build #14
  • 165dc680 on github
  • Prev Build on master (#13)
  • Next Build on master (#16)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc