Update the Library
-
After Plugin Developer commits and pushes a Release, the PM system builds and deploys environments tarballs & metadata to Cloudsmith.
-
All successfully built plugin metadata.xml’s are readily available in a Cloudsmith repository.
Plugin Developer actions:
-
Uses github and a script to tranfer the metadata.xmls from a Cloudsmith Repository to the 'library' github.com/opencn/plugins.
-
Removes older plugin releases if present.
-
Git adds and commits the changes to local git. Then pushes to their remote git repository.
-
Makes a Pull Request (PR) to 'library' github.com/opencpn/plugins master branch.
-
Confirms that the github action script accepts the PR.
More Detail: . Plugin Developer updates git local 'library' repository from upstream (opencpn/plugins). . Executes a script to copy Cloudsmith metadata to the git a local "library'. . Checks the new xml files added to the metadata directory and deletes the old xml files for the plugin. . Uses Git to add the changes, make a commit and push to the plugin developer’s remote fork. . Then from the online remote, makes a pull requesst to the 'library' opencpn/plugins master branch.
-
The metadate.xml file contains information necessary to download the essential Plugin tarball files into OpenCPN when the user chooses.
-
Refer to OpenCPN plugins project README
Library Maintainer Dave reviews Pull Request:
-
Accepts or rejects the PR.
-
If the PR is accepted, the metadata.xml files are added to the Catalog Library
-
Users can then use the "Update Plugin Catalog" button in Options > Plugins to update the catalog.
Catalog now available to the User in Options > Plugins
EDIT NEEDED BELOW
Add your new Metadata xml to Plugin Manager Catalog
Make Pull Request to github.com/OpenCPN/Plugiins
After Circleci, Travis and Appveyor have built the environments and deployed to one of the Cloudsmith Repositories, the resultant metadata files (.xml) must be copied and pushed up too the plugins master branch github.com/OpenCPN/plugins to become part of the the master catalog. Jon Gough has provided some bash/python scripts that accomplish copy to your local branch to assist or you can simply do this part manually.
Generally try not to use raw git commands unless really needed, In Linux & Windows install the 'beta' testing version (for free opensource work) SmartGit (sometimes it hasn’t had all the capabilities of git).
Use a Manual process and script
to move metadata.xml to github.com/plugins.
After completing (Ewdwe ro Read-Build.md)
-
Initial Setup of Remote Fork and Local Repository
-
Set remote upstream and origin
-
Create a new local branch, i.e. master or beta or alpha using upstream/master
Update your local github/plugins (master, beta, alpha branches)
-
git pull upstream master ←--need our local repos to match opencpn/plugins (master branch)
-
git push origin master ←--just updating our remote repository.
Copy metadat with a script
Next copy the metadata.xml files from Cloudsmith to your local github/plugins metadirectory (master branch)
Use the Git-Gui (bash prompt) from your local github/plugins' folder, to run Jon’s bash script.
Note if you used an "_" in the name, try using "-" to get it to work!
-
Run: 'download_xml_bash.sh' with the correct parameters for your cloudsmith repository and build.
-
Examples
-
./download_xml_bash.sh <cloudsmith_repository> <plugin_version> <cloudsmith_user> <cloudsmith_level>
-
./download_xml_bash.sh testplugin_pi 1.0.114.0 jon-gough prod
-
./download_xml_bash.sh weather-routing 1.13.8.0 opencpn prod
Remove Old Plugin Metadata
Next remove only your own OLD metadata.xml files from your local github/plugins/metadata directory. Leave the other xml files alone!
Push your changes
Then add the changed files, commit and push to remote origin master branch . git add metadata/ To add the metadata files . git commit -am "[pluginname] v[version number]" Commit the metadata files . git push -u origin rg-master (Does the same as two commands 'git branch --set-upstream-to=origin/jg_master' and 'git push')
Goto upstream/master in a web browser and create pull request to OpenCPN/plugins master ←--- from [gitusername]/plugins rg-master
We can leave the local rg-master branch in place until the next job (see above)