mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 15:09:42 +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
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
- name: Run Tests
|
||||
image: python:3.6
|
||||
environment:
|
||||
COUCH_URL: 'http://couchdb:5984'
|
||||
|
|
@ -35,7 +35,24 @@ kind: pipeline
|
|||
name: publish
|
||||
|
||||
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
|
||||
settings:
|
||||
username:
|
||||
|
|
@ -44,13 +61,13 @@ steps:
|
|||
from_secret: DOCKER_PASSWORD
|
||||
repo: shouptech/humulus
|
||||
tags:
|
||||
- ${DRONE_COMMIT_SHA}
|
||||
- ${DRONE_BUILD_NUMBER}
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: docker-latest
|
||||
- name: Publish latest docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
|
|
@ -67,7 +84,7 @@ steps:
|
|||
exclude:
|
||||
- pull_request
|
||||
|
||||
- name: docker-release
|
||||
- name: Publish release docker image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username:
|
||||
|
|
|
|||
|
|
@ -12,4 +12,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# 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