Skip to content

Commit 6a59508

Browse files
committed
Updated deployment scripts
1 parent 97d2289 commit 6a59508

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ trace*.txt
1313
*.pri
1414
*.zip
1515
distro/msix/manifest_*/stm_rules
16+
stackmuncher-x86_64-unknown-linux-gnu
17+
stackmuncher-x86_64-unknown-linux-musl

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ The app creates a sample stack report on the first run over a project without su
4141
_This is an alpha release and the only way to run this app is to compile it from the source in Rust._
4242

4343
1. Download the latest binary from GitHub
44-
* Linux (GNU): `sudo curl -o /usr/bin/stackmuncher -L https://github.com/stackmuncher/stm_app/releases/download/v0.1.3/stackmuncher-x86_64-unknown-linux-gnu && sudo chmod 755 /usr/bin/stackmuncher`
45-
* Linux (MUSL): `sudo curl -o /usr/bin/stackmuncher -L https://github.com/stackmuncher/stm_app/releases/download/v0.1.3/stackmuncher-x86_64-unknown-linux-musl && sudo chmod 755 /usr/bin/stackmuncher`
46-
* Windows: `invoke-webrequest -uri https://github.com/stackmuncher/stm_app/releases/download/v0.1.3/stackmuncher-x86_64-pc-windows-msvc.exe -outfile $env:windir\stackmuncher.exe`
44+
* Linux (GNU): `sudo curl -o /usr/bin/stackmuncher -L https://github.com/stackmuncher/stm_app/releases/download/v0.1.4/stackmuncher-x86_64-unknown-linux-gnu && sudo chmod 755 /usr/bin/stackmuncher`
45+
* Linux (MUSL): `sudo curl -o /usr/bin/stackmuncher -L https://github.com/stackmuncher/stm_app/releases/download/v0.1.4/stackmuncher-x86_64-unknown-linux-musl && sudo chmod 755 /usr/bin/stackmuncher`
46+
* Windows: `invoke-webrequest -uri https://github.com/stackmuncher/stm_app/releases/download/v0.1.4/stackmuncher-x86_64-pc-windows-msvc.exe -outfile $env:windir\stackmuncher.exe`
4747
2. Change the current directory to one of your projects with a Git repository (has _.git_ subfolder) and run:
4848
* Linux: `stackmuncher`
49-
* Windows PowerShell: `.\stackmuncher.exe`
49+
* Windows PowerShell: `stackmuncher`
5050

5151
The app will access the local Git repository for the current directory and create a stack report, but will NOT submit any data to the Directory to let you review the stack report first. It will start updating your profile on subsequent runs unless `--dryrun` flag is used.
5252

distro/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ All *.sh* and *.ps1* scripts should be run from the project root.
2020

2121
The app should be deployed to `/usr/bin/stackmuncher` and the rules to `/usr/share/stackmuncher/stm_rules/`. The choice is based on [Linux Filesystem Hierarchy Standard](https://www.pathname.com/fhs/).
2222

23+
### Pre-requisites
24+
1. Make sure musl build tools are installed
25+
```shell
26+
sudo apt update
27+
sudo apt install musl-tools
28+
```
29+
2. Manual build: [distro/ubuntu/build_release.sh](distro/ubuntu/build_release.sh)
30+
2331
### deb package
2432

2533
deb builds rely on [cargo-deb](https://crates.io/crates/cargo-deb) crate. See config inside [stackmuncher/Cargo.toml](stackmuncher/Cargo.toml) `[package.metadata.deb]` table.
@@ -57,6 +65,18 @@ Installation process:
5765

5866
Dev cert: http://distro.stackmuncher.com/msix/stm_dev.cer <-- FOR DEVELOPMENT ONLY
5967

68+
### Manual binary build
69+
```powershell
70+
cargo build --release --target x86_64-pc-windows-msvc
71+
cp target\x86_64-pc-windows-msvc\release\stackmuncher.exe ..\stackmuncher-x86_64-pc-windows-msvc.exe
72+
signtool sign /f ..\stm.pfx /p $env:stmpfxpwd /t http://timestamp.digicert.com /fd SHA256 ..\stackmuncher-x86_64-pc-windows-msvc.exe
73+
cp ..\stackmuncher-x86_64-pc-windows-msvc.exe $env:windir\stackmuncher.exe
74+
# TEST-RUN IT BEFORE UPLOADING
75+
aws s3 cp ..\stackmuncher-x86_64-pc-windows-msvc.exe s3://$env:stmdistrobucket/
76+
```
77+
Copy the Win distributable from _distro_ bucket: `aws s3 cp s3://$STM_S3_BUCKET_DISTRO/stackmuncher-x86_64-pc-windows-msvc.exe .`
78+
79+
6080
#### Dev and testing
6181

6282
*stm_dev.pfx* is needed to sign a package. *stm_dev.cer* should be installed on the test machine. Both files can be generated with *distro\msix\cert_gen_self_signed.ps1*.

distro/ubuntu/build_release.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# sudo apt update
2+
# sudo apt install musl-tools
3+
# cargo clean
4+
# cargo update
5+
6+
cargo build --release --target x86_64-unknown-linux-gnu
7+
cp -f target/x86_64-unknown-linux-gnu/release/stackmuncher stackmuncher-x86_64-unknown-linux-gnu
8+
cargo build --release --target x86_64-unknown-linux-musl
9+
cp -f target/x86_64-unknown-linux-musl/release/stackmuncher stackmuncher-x86_64-unknown-linux-musl

0 commit comments

Comments
 (0)