Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Create a Cloud Function that is sensitive to the deployment of a new version in Firebase Hosting?

I am trying to implement a function that will be triggered once a new version has been released—in other words, once my Firebase deployment finishes deploying all the changes. Does Firebase support such a possibility? I want to enable live updates for my app once I release a new version.

// on new version release
exports.onHostingRelease = functions
  .runWith({ timeoutSeconds: 540, memory: '2GB' })
  .hosting.site('your-site-name')
  .onRelease((versionMetadata) => {
    // versionMetadata is an object that contains information about the new version
    console.log('New version deployed:', versionMetadata.versionString);

    // You can perform any actions you need here, such as sending a notification
    // or updating a database record

    return null;
  });

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

All supported Firebase triggers are listed and described under the "Trigger background functions" section of the document in the left navigation you see in the documentation. As of this writing, there are no triggers for Firebase Hosting.

Feel free to send feedback to Firebase support with your feature request.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading