@@ -198,13 +198,7 @@ func (m *Manager) parseBinaryExtensionDir(fi fs.FileInfo) (Extension, error) {
198198 remoteURL := ghrepo .GenerateRepoURL (repo , "" )
199199 ext .url = remoteURL
200200 ext .currentVersion = bm .Tag
201- << << << < HEAD
202- if bm .Pinned {
203- ext .pin = bm .Tag
204- }
205- == == == =
206201 ext .isPinned = bm .IsPinned
207- >> >> >> > tmp
208202 return ext , nil
209203}
210204
@@ -214,17 +208,10 @@ func (m *Manager) parseGitExtensionDir(fi fs.FileInfo) (Extension, error) {
214208 remoteUrl := m .getRemoteUrl (fi .Name ())
215209 currentVersion := m .getCurrentVersion (fi .Name ())
216210
217- << << << < HEAD
218- var pinnedVersion string
219- pinPath := filepath .Join (id , fi .Name (), fmt .Sprintf (".pin-%s" , currentVersion ))
220- if _ , err := os .Stat (pinPath ); err == nil && len (currentVersion ) > 6 {
221- pinnedVersion = currentVersion [:7 ]
222- == == == =
223211 var isPinned bool
224212 pinPath := filepath .Join (id , fi .Name (), fmt .Sprintf (".pin-%s" , currentVersion ))
225213 if _ , err := os .Stat (pinPath ); err == nil {
226214 isPinned = true
227- >> >> >> > tmp
228215 }
229216
230217 return Extension {
@@ -233,11 +220,7 @@ func (m *Manager) parseGitExtensionDir(fi fs.FileInfo) (Extension, error) {
233220 isLocal : false ,
234221 currentVersion : currentVersion ,
235222 kind : GitKind ,
236- << << << < HEAD
237- pin : pinnedVersion ,
238- == == == =
239223 isPinned : isPinned ,
240- >> >> >> > tmp
241224 }, nil
242225}
243226
@@ -339,19 +322,11 @@ func (m *Manager) InstallLocal(dir string) error {
339322}
340323
341324type binManifest struct {
342- << << << < HEAD
343- Owner string
344- Name string
345- Host string
346- Tag string
347- Pinned bool
348- == == == =
349325 Owner string
350326 Name string
351327 Host string
352328 Tag string
353329 IsPinned bool
354- >> >> >> > tmp
355330 // TODO I may end up not using this; just thinking ahead to local installs
356331 Path string
357332}
@@ -423,21 +398,12 @@ func (m *Manager) installBin(repo ghrepo.Interface, target string) error {
423398 }
424399
425400 manifest := binManifest {
426- << << << < HEAD
427- Name: name ,
428- Owner : repo .RepoOwner (),
429- Host : repo .RepoHost (),
430- Path : binPath ,
431- Tag : r .Tag ,
432- Pinned : isPinned ,
433- == == == =
434401 Name : name ,
435402 Owner : repo .RepoOwner (),
436403 Host : repo .RepoHost (),
437404 Path : binPath ,
438405 Tag : r .Tag ,
439406 IsPinned : isPinned ,
440- >> >> >> > tmp
441407 }
442408
443409 bs , err := yaml .Marshal (manifest )
@@ -501,11 +467,7 @@ func (m *Manager) installGit(repo ghrepo.Interface, target string, stdout, stder
501467 pinPath := filepath .Join (targetDir , fmt .Sprintf (".pin-%s" , commitSHA ))
502468 f , err := os .OpenFile (pinPath , os .O_WRONLY | os .O_CREATE , 0600 )
503469 if err != nil {
504- << << << < HEAD
505- return fmt .Errorf ("failed to create pin in directory: %w" , err )
506- == == == =
507470 return fmt .Errorf ("failed to create pin file in directory: %w" , err )
508- >> >> >> > tmp
509471 }
510472 return f .Close ()
511473}
@@ -569,11 +531,7 @@ func (m *Manager) upgradeExtension(ext Extension, force bool) error {
569531 if ext .isLocal {
570532 return localExtensionUpgradeError
571533 }
572- << << << < HEAD
573- if ext .pin != "" {
574- == == == =
575534 if ext .IsPinned () {
576- >> >> >> > tmp
577535 return pinnedExtensionUpgradeError
578536 }
579537 if ! ext .UpdateAvailable () {
0 commit comments