Skip to content
Open
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions src/pg_cron.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@
#include "utils/builtins.h"


#ifdef PG_MODULE_MAGIC_EXT
PG_MODULE_MAGIC_EXT(.name = "pg_cron", .version = "1.6.7");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would be nice to use a compile constant derived from the tag. We're likely to forget updating this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I fully agree.

I see some other projects pulling their versions from macros of their own headers, or the Makefile providing the macro through CFLAGS, or other mechanisms.

But I didn't find a place where the pg_cron version was kept up to date, except in CHANGELOG.md. Not sure that parsing that is the best idea.

The file META.json looks interesting, but that also looks a bit outdated.

One could ask git-decorate for the latest tag, as you mention, but that wouldn't work when building from a .tar.gz, which some distributions may be doing.

#else
PG_MODULE_MAGIC;
#endif

#ifndef MAXINT8LEN
#define MAXINT8LEN 20
Expand Down