Skip to content

Commit

Permalink
Merge pull request #990 from henilp105/fpm-registry
Browse files Browse the repository at this point in the history
fix: update registry backend APIs and download functionality
  • Loading branch information
henilp105 committed Mar 23, 2024
2 parents 6bf8c23 + c4c0bb7 commit 0628a8f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/fpm/cmd/publish.f90
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ subroutine cmd_publish(settings)
tmp_file = get_temp_filename()
call git_archive('.', tmp_file, 'HEAD', settings%verbose, error)
if (allocated(error)) call fpm_stop(1, '*cmd_publish* Archive error: '//error%message)
call model%dump('fpm_model.json', error, json=.true.)
if (allocated(error)) call fpm_stop(1, '*cmd_publish* Model dump error: '//error%message)

upload_data = [ &
& string_t('package_name="'//package%name//'"'), &
Expand Down
2 changes: 1 addition & 1 deletion src/fpm/dependency.f90
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ subroutine get_from_registry(self, target_dir, global_settings, error, downloade
end if

! Include namespace and package name in the target url and download package data.
target_url = global_settings%registry_settings%url//'/packages/'//self%namespace//'/'//self%name
target_url = global_settings%registry_settings%url//'packages/'//self%namespace//'/'//self%name
call downloader%get_pkg_data(target_url, self%requested_version, tmp_file, json, error)
close (unit, status='delete')
if (allocated(error)) return
Expand Down
2 changes: 1 addition & 1 deletion src/fpm_command_line.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ subroutine set_help()
'DESCRIPTION', &
' Follow the steps to create a tarball and upload a package to the registry:', &
'', &
' 1. Register on the website (https://registry-frontend.vercel.app/).', &
' 1. Register on the website (https://registry-phi.vercel.app/).', &
' 2. Create a namespace. Uploaded packages must be assigned to a unique', &
' namespace to avoid conflicts among packages with similar names. A', &
' namespace can accommodate multiple packages.', &
Expand Down
2 changes: 1 addition & 1 deletion src/fpm_settings.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module fpm_settings
private
public :: fpm_global_settings, get_global_settings, get_registry_settings, official_registry_base_url

character(*), parameter :: official_registry_base_url = 'https://registry-apis.vercel.app'
character(*), parameter :: official_registry_base_url = 'https://fpm-registry.vercel.app'
character(*), parameter :: default_config_file_name = 'config.toml'

type :: fpm_global_settings
Expand Down

0 comments on commit 0628a8f

Please sign in to comment.