File tree Expand file tree Collapse file tree 6 files changed +73
-9
lines changed
Expand file tree Collapse file tree 6 files changed +73
-9
lines changed Original file line number Diff line number Diff line change 1212# ecsact codegen
1313* .ecsact. *
1414
15- # MSIX distribution folder
15+ # Distribution files
1616/dist /*
17+
18+ # MSIX distribution folder
1719! /dist /AppxManifest.xml
1820* .msix
1921* .zip
22+
23+ # Debian distribution
24+ ! /dist /DEBIAN
25+ * .deb
26+ * .tar.gz
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env pwsh
2+
3+ param (
4+ [Parameter (Mandatory )] $Version
5+ )
6+
7+ $ErrorActionPreference = ' Stop'
8+
9+ $DebPath = " ecsact_sdk_$ ( $Version ) _amd64.deb"
10+
11+ try {
12+ ((Get-Content - path ./ dist/ DEBIAN/ control - Raw) -replace ' 0.0.0-placeholder' , " $ ( $Version ) " ) | Set-Content - Path ./ dist/ DEBIAN/ control
13+ rm - rf ./ dist/ images
14+ rm ./ dist/ AppxManifest.xml
15+ rm -f ./ dist/ bin/ ecsact_rtb.runfiles/ ecsact_cli/ ecsact
16+ dpkg- deb -- build -- root- owner- group ./ dist $DebPath
17+ } finally {
18+ git checkout ./ dist/ DEBIAN/ control
19+ git checkout ./ dist/ AppxManifest.xml
20+ }
21+
Original file line number Diff line number Diff line change @@ -7,17 +7,25 @@ param (
77
88$ErrorActionPreference = ' Stop'
99
10- $ExistingPackage = Get-AppPackage EcsactSdk
11-
12- if ($ExistingPackage ) {
13- Remove-AppPackage - Package $ExistingPackage.PackageFullName
14- }
15-
1610$GitTag = git describe -- tags -- abbrev= 0
1711$GitTagSplit = $GitTag.Split (" ." )
1812$IncrementedVersion = $GitTagSplit [0 ] + " ." + $GitTagSplit [1 ] + " ." + (([int ]$GitTagSplit [2 ]) + 1 )
1913
2014. .\CopyDist.ps1
21- . .\CreateMsix.ps1 - Version $IncrementedVersion - CertPassword $CertPassword - CertPath $CertPath
2215
23- Add-AppPackage - Path $MsixPath
16+ if ([System.Environment ]::OSVersion.Platform -eq ' Unix' ) {
17+ # TODO(zaucy): Check if developer machine can install .deb files and give
18+ # a nice error if they can't.
19+ . ./ CreateDeb.ps1 - Version $IncrementedVersion
20+ sudo dpkg - i $DebPath
21+ } else {
22+ $ExistingPackage = Get-AppPackage EcsactSdk
23+
24+ if ($ExistingPackage ) {
25+ Remove-AppPackage - Package $ExistingPackage.PackageFullName
26+ }
27+
28+ . .\CreateMsix.ps1 - Version $IncrementedVersion - CertPassword $CertPassword - CertPath $CertPath
29+ Add-AppPackage - Path $MsixPath
30+ }
31+
Original file line number Diff line number Diff line change 1+ # !/usr/bin/env pwsh
2+
3+ $ErrorActionPreference = ' Stop'
4+
5+ # GitHub requires TLS 1.2
6+ [Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType ]::Tls12
7+
8+ $LatestTag = (gh release list - L 1 ).split()[0 ]
9+ Write-Host " Latest Tag: $LatestTag "
10+
11+ $ArchiveUrl = " https://github.com/ecsact-dev/ecsact_sdk/releases/download/$ ( $LatestTag ) /ecsact_sdk_$ ( $LatestTag ) _linux_x64.tar.gz"
12+ $ArchivePath = " ecsact_sdk_$ ( $LatestTag ) _linux_x64.tar.gz"
13+
14+ Write-Host " Downloading $ArchiveUrl to $ArchivePath ..."
15+ Invoke-WebRequest $ArchiveUrl - OutFile $ArchivePath - UseBasicParsing
16+
17+ git clean dist - dfx
18+ Write-Host " Extracting $ArchivePath to dist..."
19+ tar - xf $ArchivePath - C dist
20+
21+ . .\CreateDeb.ps1 - Version $LatestTag
22+ gh release upload $LatestTag $DebPath -- clobber
23+
Original file line number Diff line number Diff line change 1+ Package: ecsact-sdk
2+ Version: 0.0.0-placeholder
3+ Architecture: amd64
4+ Maintainer: Ezekiel Warren <ezekiel@seaube.com>
5+ Description: Ecsact SDK
You can’t perform that action at this time.
0 commit comments