Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Automatically find the latest released version of opencloud#687

Merged
v-scharf merged 1 commit into
mainfrom
deploy_simple2
Apr 17, 2025
Merged

Automatically find the latest released version of opencloud#687
v-scharf merged 1 commit into
mainfrom
deploy_simple2

Conversation

@dragotin

@dragotin dragotin commented Apr 16, 2025

Copy link
Copy Markdown
Member

Description

So far the latest version of the rolling release was hardcoded in the script, which outdates often.

With this improvement it queries the github api for the latest release and uses the version number from there as default.

@v-scharf v-scharf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm 👍

@v-scharf v-scharf merged commit 2f7e0c3 into main Apr 17, 2025
@v-scharf v-scharf deleted the deploy_simple2 branch April 17, 2025 07:10
@openclouders openclouders mentioned this pull request Apr 16, 2025
1 task
@micbar

micbar commented Apr 17, 2025

Copy link
Copy Markdown
Member

@dragotin Sorry to be late, but that change creates the requirement, that jq is installed at the target system. I think that should be documented.

@dragotin

Copy link
Copy Markdown
Member Author

Very good point - that is not acceptable :-/ I will see if I find a way to do it without jq. Thanks

@v-scharf

Copy link
Copy Markdown
Contributor

@dragotin Sorry to be late, but that change creates the requirement, that jq is installed at the target system. I think that should be documented.

Maybe use grep?

function get_latest_version() {
    latest_version=$(curl -s https://api.github.com/repos/opencloud-eu/opencloud/releases/latest \ 
    | grep '"tag_name":' \ -> "tag_name": "v2.1.0"
    | awk -F: '{print $2}' \ -> "v2.1.0"
    | tr -d ' ",v') -> 2.1.0
}

@v-scharf

Copy link
Copy Markdown
Contributor

#699

Screenshot 2025-04-17 at 21 40 30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants