Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to date based versioning #1112

Merged
merged 4 commits into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@ docker_images:
github:
# This deletes the GitHub PR branch after successfully merged into the release branch
delete_branch_on_merge: true
# allow bumping the minor release via label
minor_bump_labels:
- "Expeditor: Bump Version Minor"
# allow bumping the major release via label
major_bump_labels:
- "Expeditor: Bump Version Major"
# https://expeditor.chef.io/docs/getting-started/subscriptions/#merge-actions
# The `merge_actions` key is a shortcut for the
# `pull_request_merged:<GITHUB_REPO>:<RELEASE_BRANCH>:*` subscription.
merge_actions:
- built_in:bump_version:
- bash:.expeditor/determine_version.sh:
ignore_labels:
- "Expeditor: Skip Version Bump"
- "Expeditor: Skip All"
Expand Down
14 changes: 14 additions & 0 deletions .expeditor/determine_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# This gets run as a pre-commit hook just prior to a merge to
# determine the new version number.

# Leading zeros are not permitted in strict SemVer
YEAR=`date +"%y" | sed -e 's/^0//'` # Must be < 256 per Microsoft
MONTH=`date +"%m" | sed -e 's/^0//'`

OLD_BUILD=`cut -f3 -d. < VERSION`

NEW_BUILD=$(($OLD_BUILD + 1)) # Monotonically increase the build number

echo $YEAR.$MONTH.$NEW_BUILD > VERSION
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LABEL maintainer="Chef Software, Inc. <docker@chef.io>"
ARG EXPEDITOR_CHANNEL
ARG CHANNEL=stable
ARG EXPEDITOR_VERSION
ARG VERSION=0.17.5
ARG VERSION=20.4.1
ENV DEBIAN_FRONTEND=noninteractive \
PATH=/opt/chef-workstation/bin:/opt/chef-workstation/embedded/bin:/root/.chefdk/gem/ruby/2.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.17.28
20.4.1