-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes for build script and build action workflow
- Loading branch information
1 parent
1bde86d
commit 82d6559
Showing
4 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
get_version() { | ||
VERSION=$(grep '^version =' Cargo.toml | sed 's/version = "//' | sed 's/"//') | ||
} | ||
get_version | ||
|
||
APPIMAGE_EXTRACT_AND_RUN=1 cargo appimage | ||
|
||
artifact_name_path="/app/target/appimage" | ||
artifact_name="veridian-controller" | ||
artifact_ext=".AppImage" | ||
|
||
full_binary_path="${artifact_name_path}/${artifact_name}${artifact_ext}" | ||
full_versioned_path="${artifact_name_path}/${artifact_name}_${VERSION}${artifact_ext}" | ||
versioned_path="${artifact_name}_${VERSION}${artifact_ext}" | ||
|
||
mv -f "${full_binary_path}" "${full_versioned_path}" | ||
echo "" && echo "AppImage release build created at: \"${full_versioned_path}\"" | ||
|
||
cd /app/target/appimage || exit | ||
sha256sum "${versioned_path}" >"${versioned_path}.sha256" | ||
|
||
if [[ "$CI" == false ]]; then | ||
# package to tar.gz when running locally | ||
tar -cvzf veridian-controller_"${VERSION}".tar.gz ./* | ||
fi |