Distributing Releases

When using the code from the GIT:
print(“Checking for software release update…”)
LexActivator.CheckForReleaseUpdate(“windows”, “0.1.1”, “alpha”, software_release_update_callback)

It’s not clear to me what should be passed in CheckForReleaseUpdate()
Is that the current release? Past release?

I’ve created two releases, 0.1 and 0.1.1 and tried them both in that field an always get a response back saying there are no new releases. Both are published.
What exactly am I doing wrong here?

Hi,

When you ship your software, it would typically know it’s version. So, in the CheckForReleaseUpdate() function you will pass the current version of your app, which you already know in the app. If a new version was released, whose semver is greater than your current version then it will notify you about the update.

That makes sense, but when I run
LexActivator.CheckForReleaseUpdate(“windows”, “0.1”, “alpha”, software_release_update_callback)

I have a 0.1.1 version but it still says there is no update available. Clearly I’m doing something wrong. Do I need to delete the previous version?

Ok, figured it out. Using LexActivator, passing “0.1” != “0.1.0”
If you don’t specify the “.0” at the end then it will not check for versions at the 3rd/patch level.

Moral of the story, always use all 4 place holders. “0.0.0.0”

Here is the documentation:

https://docs.cryptlex.com/release-management/distributing-releases#ignoring-patch-and-build-updates

I would recommend using major.minor.patch instead of 0.0.0.0

I should read better…I’m sorry.

I’m still have some issues.

When I run this command:

curl -X GET -H "Authorization: Bearer {mysuperlongkey}" "https://api.cryptlex.com/v3/releases/?key=prettylongkey&platform=windows&productid=sortalongkey"

I get the expected response. However, when I try to check for the latest release (below), I get an empty response.

curl -X GET -H "Authorization: Bearer {mysuperlongkey}" "https://api.cryptlex.com/v3/releases/latest?key=prettylongkey&platform=windows&productid=sortalongkey"

Any ideas on what I’m doing wrong?

Hi,

You don’t need an access token to get the latest version. The license key is used for authentication.

So I ran this and still get back an empty response.

curl -X GET "https://api.cryptlex.com/v3/releases/latest?key=prettylongkey&platform=windows&productid=sortalongkey"

Any ideas?

Hi,

What is the http status code returned? Are there any published releases?

I have 2 releases published but get this error.

Either the license key is incorrect or it doesn’t belong to the product which is being queried.

From the License detail:
KEY: 51F8A8-5046B4-4C46BD-EA2F48-46F675-624E53
REVOKED:false
SUSPENDED:false
TOTAL ACTIVATIONS:1
TOTAL DEACTIVATIONS:0
VALIDITY:86400
EXPIRATION STRATEGY:immediate
FINGERPRINT MATCHING STRATEGY:fuzzy
ALLOWED ACTIVATIONS:1
ALLOWED DEACTIVATIONS:0
TYPE:node-locked
SERVER SYNC GRACE PERIOD:86400
SERVER SYNC INTERVAL:3600
ALLOWED CLOCK OFFSET:60
EXPIRING SOON EVENT OFFSET:259200
EXPIRES AT:Apr 7, 2021 4:57 PM
ALLOW VM ACTIVATION:true
ALLOW CONTAINER ACTIVATION:true
USER LOCKED: true
REQUIRE AUTHENTICATION:false
DISABLE GEO LOCATION:false
NOTES:
PRODUCT ID:015cf44c-5890-4f4d-93f1-1efb0dc84574

My curl command:
curl -I -X GET “https://api.cryptlex.com/v3/releases/latest?key=51F8A8-5046B4-4C46BD-EA2F48-46F675-624E53&platform=windows&productId=015cf44c-5890-4f4d-93f1-1efb0dc84574

Please try it yourself. I have 2 active, published releases that I can see polling the api using just using v3/releases/. I’m sure it’s something I’m doing wrong…usually is, I just can’t see it.

It seems you have added a channel to your release other than stable, and you are not passing your channel as a query param.

You nailed it!

Very helpful as always.
Thank you