appleboy/drone-telegram

Invalid version of github.com/drone/drone-template-lib

Techassi opened this issue · 6 comments

You changed the version of github.com/drone/drone-template-lib from v1.0.0 in this commit to v1.0.1-x to fix the issue in #89 and #92. Also see #47

With your latest release / version v1.3.9 you accidentally changed the version of github.com/drone/drone-template-lib back to v1.0.0 which breaks the templating functions duration, datetime and since because these functions expect a float64 value but build.started and build.finished are int64 values.

I guess there are two possible solutions: Reverting / changing back to version v1.0.1-x or opening a PR on the drone-template-lib project to release a new version with the correct values; the master branch already has the correct int64 type, but the released branch v1.0.0 uses the old float64 type.

Any update on this @appleboy ?

I will take it.

I find another issue in duration function. I will fire a new issue in drone-template-lib.

Can confirm this now works without any issues (tested with local binary):

./drone-telegram --token <token> --to <to> --build.started 1625309840

with template

Date/Time: {{datetime build.started "2006-01-02 15:04:05 -0700" "Europe/Berlin"}}

returns

Date/Time: 2021-07-03 12:57:20 +0200

Will now check out the updated docker image!

EDIT

Can also confirm that the helper functions since and duration work.

EDIT 2

The lastest docker image also works without any issues. This issues is fixed. Thanks @appleboy

@Techassi Thanks for your testing report.