Skip to content

Deploying with Git Tags

lukmay edited this page May 16, 2024 · 2 revisions

Checking Requirements

Before deploying, ensure your web component meets all the requirements necessary for publication. Check out the How-to guide for a comprehensive checklist.

Deploying with Git Tags

Web components in the Open Data Hub Community are deployed to production using git tags, which allows for precise version control. Here's how you can manage and deploy your web component using this method:

  1. Verify Existing Tags

    • To see all existing tags in your repository, use the following command:
      git tag
    • This will list all the tags currently created, helping you keep track of versions and avoid duplicates.
  2. Identify the Latest Tag

    • To determine which commit has the latest tag, utilize the git log command:
      git log
    • This command provides a detailed commit history. Tags in the log will be highlighted, allowing you to see which commit corresponds to the latest version. For instance, in the repository webcomp-flightdata-realtime, the tags might be displayed in bold and red for easy identification.
  3. Create a New Tag

    • When you're ready to deploy a new version of your web component, create a new tag with a semantic versioning format:
      git tag v0.0.5
    • Replace v0.0.5 with your appropriate version number.
  4. Push the New Tag

    • After creating the new tag, push it to your remote repository to update the version available in the store:
      git push --tags
    • This command ensures that your new version is published and available for deployment through the Open Data Hub Store.

By following these steps, you can maintain control over your web component’s versioning and ensure a smooth deployment process.

Deployment for Other Repositories

For repositories other than web components, the standard deployment method involves using the production branch. Ensure you merge your changes into the prod branch to deploy updates.


Example

Here's an example to illustrate these steps. Suppose you have a web component named webcomp-weather-widget and you want to deploy a new version.

  1. Check existing tags:

    git tag
  2. Identify the latest commit with a tag:

    git log
  3. Create a new tag for version 1.0.0:

    git tag v1.0.0
    
  4. Push the new tag to the repository:

    git push --tags
    

Following these steps ensures your web component is correctly versioned and deployed.

Clone this wiki locally