Skip to content

Commit

Permalink
fix: check update version
Browse files Browse the repository at this point in the history
  • Loading branch information
tonylu00 authored Jan 7, 2025
1 parent 4709fe4 commit 2237ac2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/flutter-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ env:
API_SERVER: "${{ secrets.API_SERVER }}"
MASTER_PASSWORD: "${{ secrets.MASTER_PASSWORD }}"
UPDATE_URL: "${{ secrets.UPDATE_URL }}"
TAG_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || '' }}
UPLOAD_ARTIFACT: "${{ inputs.upload-artifact }}"
SIGN_BASE_URL: "${{ secrets.SIGN_BASE_URL }}"
FONTS_GSTATIC_URL: "${{ secrets.FONTS_GSTATIC_URL }}"
Expand Down Expand Up @@ -1525,6 +1526,7 @@ jobs:
--env RS_PUB_KEY=${{ env.RS_PUB_KEY }}
--env MASTER_PASSWORD=${{ env.MASTER_PASSWORD }}
--env UPDATE_URL=${{ env.UPDATE_URL }}
--env TAG_VERSION=${{ env.TAG_VERSION }}
shell: /bin/bash
install: |
apt-get update -y
Expand Down Expand Up @@ -1802,6 +1804,7 @@ jobs:
--env RS_PUB_KEY=${{ env.RS_PUB_KEY }}
--env MASTER_PASSWORD=${{ env.MASTER_PASSWORD }}
--env UPDATE_URL=${{ env.UPDATE_URL }}
--env TAG_VERSION=${{ env.TAG_VERSION }}
shell: /bin/bash
install: |
apt-get update
Expand Down
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ async fn check_software_update_() -> hbb_common::ResultType<()> {

let response_url = latest_release_response.url().to_string();

if get_version_number(&latest_release_version) > get_version_number(crate::VERSION) {
if get_version_number(&latest_release_version) > get_version_number(option_env!("TAG_VERSION").unwrap_or(crate::VERSION)) {
#[cfg(feature = "flutter")]
{
let mut m = HashMap::new();
Expand Down

0 comments on commit 2237ac2

Please sign in to comment.