We run four types of apps on OCP, all defined by the naming convention and the use of tags.
Released Apps - These are apps that have been released to production and are available in the OCP App Directory.
Private Apps - These are apps that have been released to production, but their availaiblity in the OCP App Directory is limited to one or more accounts.
Beta Apps - These are apps that have NOT been released to production, but can be shared via private URL's for testing, etc.
Dev Apps - These are apps that have NOT been released to production. These apps cannot be shared and are limited to run in the developers given account.
For our "getting started" purposes, we are working with a Dev app. Below is a brief intro into the app naming convention and how it's used on the OCP platform.
We follow the Symantic Versioning specification of version management for apps built on the OCP platform. You can read about the standard in detail here.
For now, let's give you the high level intro and walk through updating your most recent app.
All of our apps follow the semver.org standards, where, given a version number MAJOR.MINOR.PATCH, we increment:
- The MAJOR version when you make an incompatible API change
- The MINOR version when you add functionality in a backwards compatible manner, and
- PATCH versiobn when you make backwards compatible bug fixes.
We also support two types of pre-release tags, -beta, and -dev. Any app with a pre-release tag is not globablly visible inside the app directory and is intended to serve as a work in progress.
For this example with your app, we will focus on the MAJOR, MINOR, PATCH version convention with the -dev pre-release tag.
Recall the versioning of the app you've built is in the following format:
If you've been following along, recall for the example app we've built, the app's name and version is:
Note that the format: MAJOR.MINOR.PATCH-dev.VERSION
-dev identifies your build as pre-release
.VERSION is the pre-release incrementer.
The role of pre-release versioning is to allow you to work on a single train of code, a consistently named MAJOR.MINOR.PATCH version of code, where you increment the pre-release tag as necessary until you are ready for the release of your production release. (You can find more on this topic here)
For example, imagine your next OCP app release is going to be 2.1.9. During your developement work, you end up with 4 pre-release versions before you are ready for final release. Your versioning would look like this:
2.1.9-dev.1 - This is your first pre-release version
2.1.9_dev.2 - This is your second pre-release version
2.1.9_dev.3 - This is your third pre-release version
2.1.9_dev.4 - This is your fourth pre-release version
2.1.9 - This is your release version
The pre-release tag and versioning allowed you to modify your release without incrementing the MAJOR, MINOR or PATCH numbers. Your relase ID remains consistent while you worked on your code, only incrementing the pre-release tag as you work.
This is what we are going to do with your new app. We are going to modify the pre-release tag you started with from .1 to .2, while maintaining the MAJOR, MINOR and PATCH version numbers.
Developers can only publish -dev pre-release tags. The -dev tag allows you to work in a sandbox environment, without formal code review, and without the ability to impact other apps, users, accounts, etc. The apps you build like this are hidden from the App Directory, so there is privacy and other users are prevented from seeing or using your apps.
- Update the app.yml file for your app on your local machine. Increment the pre-release version to .2 and save your changes. In our example, that looks like this:
- Switch your terminal into the directory where your target code is located. In our example, it's C:\Source Code\my-marketing-app:
PS C:\Source Code\my-marketing-app>
- From the working directory, execute the following command: `opti app upload'. This will upload the latest version of your app. Your result should look like this:
opti directory publish <app_name>@<app_version>to publish your updated app. In our case the command is
opti directory publish [email protected]:
opti directory install <app_name>@<app_version>to install your app to the App Directory. In our case the command is
opti directory install [email protected]:
At this time, your updated, pre-release version of your app is now published ONLY to your private version of the App Directory. Note how the pre-release tag has been incremented to "dev.2"
Updated 14 days ago