Skip to content

Commit 24731ad

Browse files
committed
Problem: how stale is the extension version?
Solution: include `#release_date` information when feasible For git-based repos, this is the date of the top commit in the checkout.
1 parent 8c98f77 commit 24731ad

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/pgpm/package/git.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ def source
7474
end
7575
end
7676

77+
def release_date
78+
::Git.open(source).log.first.date
79+
end
80+
7781
def self.included(base_class)
7882
base_class.extend(ClassMethods)
7983
end

lib/pgpm/package/metadata.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def license
1919
"TODO: license"
2020
end
2121

22+
def release_date; end
23+
2224
def broken?
2325
requires.any?(&:broken?)
2426
end

0 commit comments

Comments
 (0)