Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update registry backend APIs and download functionality #990

Merged
merged 13 commits into from
Mar 23, 2024
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:

# Phase 1: Bootstrap fpm with existing version
- name: Install fpm
uses: fortran-lang/setup-fpm@v3
uses: fortran-lang/setup-fpm@v5
with:
fpm-version: 'v0.8.0'

Expand Down
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 @@ -1451,7 +1451,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
Loading