Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Add initial offset #19

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

staceybellerose
Copy link

Add initial offset to commit time calculations, to allow for development prior to the first commit.

Read the streams from both external commands that use "waitFor()" to prevent the buffers from completely filling and the process blocking until it is read.
The stream is read with def featurelines = diffToDefault.text.trim().readLines() - which will crash if stream read sooner
@@ -69,6 +69,7 @@ ext.gitVersioner = [
yearFactor : 1200, // default "1000", increasing every 8.57h
snapshotEnabled : false, // default false, the "-SNAPSHOT" postfix
localChangesCountEnabled: false, // default false, the (<commitCount>) before -SNAPSHOT
initialOffset : 2100000, // default "0", amount of time (in seconds) to offset the initial commit by, if development started before commits began
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to set an exact timestamp instead of a difference compared to the first commit?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants