How to prevent an accidental upload in fpm?

I want to change the build system of my Fortran project to fpm but my main concern is about the possibility of an accidental upload to the registry. Programming in Rust, I simply add publish = false to Cargo.toml but I couldn’t find a comparable solution in the documentation of fpm and fpm.toml.

I’m likely to share certain codes publicly in future but some may be unfinished or else intended to be kept private. All this will be developed on the same machine while I often navigate past commands in the terminal and occasionally click too fast a wrong command.

2 Likes

Hi @piotr , currently we don’t support automatic upload to the fpm registry it can only be done by running the fpm publish command with the upload token from the registry and as currently the fpm registry is in testing phase , all the packages uploaded in this phase will be deleted after we move from testing phase.

1 Like

Thanks, @henilp105 . I thought that the testing phase finished in June but it turns out that I should visit the Forum much more regularly. :joy:

Once the testing phase is over… What if I type fpm publish --token TOKEN accidentally e.g. viewing past commands in the terminal? Think of an elegant way preventing fpm from an accidental upload.

2 Likes

We need more Rust users! Thanks @piotr for posting.

@henilp105 Is there a new schedule for the test phase? I believe the new STF grant started in September, right?
The last news were in May/June 2023:

4 Likes

Thanks @piotr , we have implemented a time lock for the token , token is invalidated after a week (and has to renewed from the registry) , in the last STF term we had a conversation regarding implementation of the equivalent functionality to restrict upload like rust has for cargo , but it has not been implemented yet.

@ivanpribec yes , the new term has been approved, but not started due to some paper work.

We intend to shift the registry to the official subdomain of fortran-lang soon. We will be announcing a new round of testing in this term as we have some major changes in fpm to support the registry.

2 Likes