@@ -8,16 +8,16 @@ Attribute VB_Creatable = False
88Attribute VB_PredeclaredId = False
99Attribute VB_Exposed = False
1010'---------------------------------------------------------------------------------------
11- ' Klassenmodul: ACLibGitHubImporter
11+ ' Class: _codelib.addins.shared. ACLibGitHubImporter
1212'---------------------------------------------------------------------------------------
13- '/**
14- ' <summary>
13+ '
1514' Import GitHub files
16- ' </summary>
17- ' <remarks>
18- ' </remarks>
19- '\ingroup addins_shared
20- '**/
15+ '
16+ ' Author:
17+ ' Josef Poetzl
18+ '
19+ '---------------------------------------------------------------------------------------
20+
2121'---------------------------------------------------------------------------------------
2222'<codelib>
2323' <file>_codelib/addins/shared/ACLibGitHubImporter.cls</file>
@@ -28,8 +28,8 @@ Attribute VB_Exposed = False
2828Option Compare Database
2929Option Explicit
3030
31- Const GitHubContentBaseUrl As String = "https://raw.githubusercontent.com/AccessCodeLib/AccessCodeLib/{branch}/{path}"
32- Const GitHubApiBaseUrl As String = "https://api.github.com/repos/AccessCodeLib/AccessCodeLib/"
31+ Private Const GitHubContentBaseUrl As String = "https://raw.githubusercontent.com/AccessCodeLib/AccessCodeLib/{branch}/{path}"
32+ Private Const GitHubApiBaseUrl As String = "https://api.github.com/repos/AccessCodeLib/AccessCodeLib/"
3333
3434Private m_LastCommit As Date
3535Private m_UseDraftBranch As Boolean
@@ -42,6 +42,9 @@ Private Declare Function DeleteUrlCacheEntry Lib "wininet.dll" Alias "DeleteUrlC
4242Private Declare Function URLDownloadToFile Lib "urlmon " Alias "URLDownloadToFileA " (ByVal pCaller As Long , ByVal szURL As String , ByVal szFileName As String , ByVal dwReserved As Long , ByVal lpfnCB As Long ) As Long
4343#End If
4444
45+ '---------------------------------------------------------------------------------------
46+ ' Property: UseDraftBranch
47+ '---------------------------------------------------------------------------------------
4548Public Property Get UseDraftBranch() As Boolean
4649 UseDraftBranch = m_UseDraftBranch
4750End Property
@@ -50,20 +53,29 @@ Public Property Let UseDraftBranch(ByVal NewValue As Boolean)
5053 m_UseDraftBranch = NewValue
5154End Property
5255
56+ '---------------------------------------------------------------------------------------
57+ ' Property: RevisionString
58+ '---------------------------------------------------------------------------------------
5359Public Property Get RevisionString(Optional ByVal Requery As Boolean = False ) As String
5460 RevisionString = Format(LastCommit, "yyyymmddhhnnss" )
5561 If UseDraftBranch Then
5662 RevisionString = RevisionString & "-draft"
5763 End If
5864End Property
5965
66+ '---------------------------------------------------------------------------------------
67+ ' Property: LastCommit
68+ '---------------------------------------------------------------------------------------
6069Public Property Get LastCommit(Optional ByVal Requery As Boolean = False ) As String
6170 If m_LastCommit = 0 Or Requery Then
6271 m_LastCommit = GetLastCommitFromWeb()
6372 End If
6473 LastCommit = m_LastCommit
6574End Property
6675
76+ '---------------------------------------------------------------------------------------
77+ ' Sub: UpdateCodeModules
78+ '---------------------------------------------------------------------------------------
6779Public Sub UpdateCodeModules ()
6880
6981 Dim SelectSql As String
@@ -95,7 +107,7 @@ Private Sub UpdateCodeModuleInTable(ByVal ModuleName As String, ByVal ACLibPath
95107 Dim DownLoadUrl As String
96108 Dim BranchName As String
97109
98- TempFile = FileTools.TempPath & ModuleName & ".cls"
110+ TempFile = FileTools.TempPath & ModuleName & FileTools.GetFileExtension(ACLibPath, True )
99111
100112 If UseDraftBranch Then
101113 BranchName = "draft"
0 commit comments