mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 16:09:44 +00:00
Update version variable during build
This commit is contained in:
parent
102e2bfd40
commit
c30c765b5d
2 changed files with 25 additions and 6 deletions
27
.drone.yml
27
.drone.yml
|
|
@ -9,7 +9,7 @@ services:
|
||||||
COUCHDB_PASSWORD: password
|
COUCHDB_PASSWORD: password
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: Run Tests
|
||||||
image: python:3.6
|
image: python:3.6
|
||||||
environment:
|
environment:
|
||||||
COUCH_URL: 'http://couchdb:5984'
|
COUCH_URL: 'http://couchdb:5984'
|
||||||
|
|
@ -35,7 +35,24 @@ kind: pipeline
|
||||||
name: publish
|
name: publish
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker-dev
|
- name: Update version (development)
|
||||||
|
image: python:3.6
|
||||||
|
commands:
|
||||||
|
- sed -i "s/.dev/.dev${DRONE_BUILD_NUMBER}/" src/humulus/_version.py
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: Update version (release)
|
||||||
|
image: python:3.6
|
||||||
|
commands:
|
||||||
|
- sed -i "s/.dev//" src/humulus/_version.py
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: Publish development docker image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
|
|
@ -44,13 +61,13 @@ steps:
|
||||||
from_secret: DOCKER_PASSWORD
|
from_secret: DOCKER_PASSWORD
|
||||||
repo: shouptech/humulus
|
repo: shouptech/humulus
|
||||||
tags:
|
tags:
|
||||||
- ${DRONE_COMMIT_SHA}
|
- ${DRONE_BUILD_NUMBER}
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: docker-latest
|
- name: Publish latest docker image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
|
|
@ -67,7 +84,7 @@ steps:
|
||||||
exclude:
|
exclude:
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
||||||
- name: docker-release
|
- name: Publish release docker image
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username:
|
username:
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,6 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
__version__ = "0.0.1"
|
# The 'dev' portion of this variable will get updated during Drone CI builds
|
||||||
|
# with a build number for all non-tagged builds.
|
||||||
|
__version__ = "0.0.1.dev"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue