Skip to content

Commit

Permalink
Merge pull request #66 from cloudnautique/main
Browse files Browse the repository at this point in the history
fix - version string in tauri
  • Loading branch information
cloudnautique authored Feb 16, 2024
2 parents 491a950 + 38d74a5 commit 63c64e5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Rust Cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./tauri/src-tauri -> target"
workspaces: "./tauri/src-tauri"

- name: Set up Nodejs
uses: actions/setup-node@v4
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/tag-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Rust Cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./tauri/src-tauri -> target"
workspaces: "./tauri/src-tauri"

- name: Set up Nodejs
uses: actions/setup-node@v4
Expand All @@ -69,6 +69,18 @@ jobs:
id: get_release_version
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: get release id
id: get_release_id
uses: actions/github-script@v7
with:
script: |
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: process.env.TAG
});
echo "RELEASE_ID=${release.data.id}" >> $GITHUB_ENV
- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -83,15 +95,6 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
with:
releaseId: ${process.env.TAG}

- name: publish release
id: publish-release
uses: actions/github-script@v7
with:
script: |
github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.TAG,
})
releaseId: ${process.env.RELEASE_ID}
args: --target universal-apple-darwin
projectPath: ./tauri
10 changes: 6 additions & 4 deletions tauri/src-tauri/src/compose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ pub fn start_docker_containers() -> Result<(), String> {
let home_dir = dirs::home_dir().ok_or("Could not find the home directory.")?;
let rubra_dir = home_dir.join(".rubra");

let mut version = env!("CARGO_PKG_VERSION");
if version == "0.0.0" {
version = "main"
}
let cargo_version = env!("CARGO_PKG_VERSION");
let version = if cargo_version == "0.0.0" {
"main".to_string()
} else {
format!("v{}", cargo_version)
};

let status = Command::new("docker-compose")
.args(["pull"])
Expand Down

0 comments on commit 63c64e5

Please sign in to comment.