Open rgleason opened 1 year ago
I think you mean: bash ./download_xml_bash weather-routing 1.9.100.0 opencpn prod
Note space instead of "_"
And where is the script "download_xml_bash.sh" ?
Its in the root of the plugins repository. When run it will download the files into the metadata directory under the root. Hence the need to be in the correct version, prod/beta/alpha, and have your own cloned branch for the push so you don't impact others.
OK, got it.
Opensource Accounts
Process Overview
Github (code repository) ---> CircleCI (build and deploy) ---> Cloudsmith repository (metadata and tarball storage) ---> Github.com/OpenCPN/plugins/[master] using a script
Git Basics
You have remote origin and remote upstream properly configured.
git remote -v
You know and understand what branch you are on.
git branch OR git branch -va
If you are not on the right branch use
git checkout [branch name]
make sure local commit is the same as remote commit and no PR's have been merged. if they don't match use
git pull origin [branch]
The other good alternative to be sure the code you are working with is current, is to fork another user's repository and then clone or if you've already forked, use the github web interface to make a PR to your remote and merge it. Then you can clone your remote repository.
Then make changes to the code
Push Commits to Github
How commits are pushed determines which Cloudsmith repository will be used for deployment. Process: Github --> CircleCI --> Cloudsmith Repositories (deployed files)
Push to Cloudsmith [plugin]-alpha repository via CircleCI
First make code changes and perhaps build locally and test. Does not need to have version number changed in CMakeLists.txt or just increment the "tweak" number.
Push to Cloudsmith [plugin]-beta repository via Github & CircleCI
First make code changes and perhaps build locally and test. Does not need to have version number changed in CMakeLists.txt or just increment the "tweak" number.
Non-master branch
Master branch just use
Push to Cloudsmith [plugin]-prod repository via Github & CircleCI
First make code changes and perhaps build locally and test. Change version number in CMakeLists.txt incrementing by one if not a big change, or increment tweak if not going to release yet.
Work from [non-master] branch and Push direct
to Cloudsmith [plugin]-prod repository via Github & CircleCI
Circleci Builds
Getting all OS built can be challenging. General Rule: Commit one plugin at a time and let it complete. Sometimes a build fails and has to be
Push metadata up to opencpn/plugins
This process uses a script in the root of the plugins repository. When run it will download the files into the metadata directory under the root. Hence the need to be in the correct version, prod/beta/alpha, and have your own cloned branch for the push so you don't impact others.
First fork github.com/opencpn/plugins from your remote github account using the web browser. Then clone your remote down to your local computer.
Refer to the frontend workflow The goal is to
github.com/OpenCPN/plugins
Checkout the appropriate branch of plugins and make sure it is current with upstream
Using a bash prompt from the plugin folder with the right branch checked out, at the root directory of plugins, copy the desired metadata into the local repository with the script:
bash ./download_xml_bash.sh [plugin-name] [version] opencpn [prod, beta or alpha]
For example
bash ./download_xml_bash weather-routing 1.9.100.0 opencpn prod <--Note hyphen instead of "_"
There are a couple of things to keep in mind:
Then file browse to plugins/metadata and find your plugin and delete the old metadata version.
Then using your browser make a PR from your remote plugin repository to opencpn/plugins repos. Then bdbcat will review and merge your PR commit.
Handling Submodules (opencpn-libs)
Submodule OpenCPN/opencpn-libs For commands see the Instructions at the bottom.
TP Collaborators on github/rgleason
(if you don't know about this it is not you) TP Collaborators on github/rgleason should be able to:
Members of Cloudsmith Opencpn Plugin Team can ceate and manage plugin repositories on Cloudsmith OpenCPN
General guidance:
Local Build and Test
First make sure the submodule opencpn-libs is loaded
$git submodule update --init opencpn-libs
Windows:
Use batch file "bld.bat". First use a VS 2022 Command Prompt to be able to review an output.txt file in the build directory.
Then use a Bash prompt to run the script which copies the metadata into the tarball so that it is compatible with "Import Plugin"
Linux & RPI
The trivial case for modern linux amd RPI plugins looks like this:
Make sure the submodule opencpn-libs is loaded
$git submodule update --init opencpn-libs
If wxWidgets is not found, set it locally in a bash script file. Adjust the path in WXWIN to match yours. How to Set environment variables in linux Note: Dave says the use if "set" for wxWidgets is unnecessary.
Start OCPN. The plugin will exist in the PIM list, as a pseudo-system plugin, as there is no metadata. But it can be enabled and tested like any other plugin. If the plugin requires private data, this will need to be copied manually.
Android
This will become available.