Skip to content

Add Changes to Your Plugin Repository

Overview

This is a how-to guide on how to add changes to your plugin repository. This will allow you to update your plugin with new features, bug fixes or config changes.

If you are familiar with Git, this How-To will be straightforward for you. If you are new to Git, don't worry, we will guide you through the process step by step.

Prerequisites

  • You are a beamline scientist and have access to your plugin repository on /sls/<XNAME>/config/bec, e.g. /sls/x01da/config/bec.

Steps to add changes to your plugin repository

  1. First, locate the correct deployment directory.

    Use:

    /sls/<xname>/config/bec/<deployment_name>/<plugin_name>

    where:

    • <xname> is the name of your beamline, e.g. x01da.
    • <deployment_name> is the name of your deployment, e.g. production or test.
    • <plugin_name> is the name of your plugin, e.g. x01da_bec.

    Examples

    • Default production instance: /sls/x01da/config/bec/production/x01da_bec
    • Test deployment (if available): /sls/x01da/config/bec/test/x01da_bec
  2. Change into the repository directory and check which files have changed.

    cd /sls/x01da/config/bec/production/x01da_bec
    git status
    

    git status shows modified files, deleted files, and any new files that are not yet tracked by Git.

  3. Edit the files you want to change, or add new files to the repository.

  4. After you have made your changes, add them to Git, commit them, and push them to the remote repository.

    1. Stage changes to tracked files:

      git add -u
      

      If you created a new file, add it explicitly:

      git add path/to/new-file
      

      Check the result with:

      git status
      
    2. Commit your changes with a meaningful commit message, for example:

      git commit -m "Update device configuration for the Eiger detector"
      
    3. Push your changes:

      git push
      
    1. Open the repository folder in VS Code.

    2. Go to the Source Control view.

    3. Review the changed files.

      Files under Changes are modified tracked files. Files under Untracked Changes are new files that still need to be added to Git.

    4. Stage the files you want to include in the commit.

      You can stage individual files with the + button, or stage all changes from the Source Control menu.

    5. Enter a meaningful commit message in the message box and commit the changes.

    6. Push the changes using Sync Changes or Push in the Source Control menu.

  5. After pushing your changes, you can open the Gitea repository:

    https://gitea.psi.ch/bec/<plugin_name>
    

    Then continue with Merge changes to main.

Next Steps

Congratulations!

You have successfully added your changes to the plugin repository. You can now deploy the updated repository to your BEC instance.