Skip to content

Commit

Permalink
add new release targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Jul 22, 2021
1 parent 415b802 commit 646a86f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
32 changes: 30 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
publishLocation: 'Container'


- job: Linux_builds
- job: Linux_x64_builds
pool:
vmImage: 'ubuntu-16.04'
steps:
Expand All @@ -53,9 +53,37 @@ jobs:
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'publish'
ArtifactName: 'drop-linux'
ArtifactName: 'drop-linux-x64'
publishLocation: 'Container'

- job: Linux_arm64_builds
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
includePreviewVersions: false
version: 3.1.x
installationPath: $(Agent.ToolsDirectory)/dotnet
- task: Bash@3
inputs:
targetType: 'inline'
script: |
sudo apt-get install ruby ruby-dev rubygems build-essential rpm
sudo gem install --no-document fpm
- task: Bash@3
inputs:
filePath: 'pack.sh'
arguments: 'linux-arm'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: 'publish'
ArtifactName: 'drop-linux-arm64'
publishLocation: 'Container'


- job: OSX_builds
pool:
vmImage: 'macOS-10.14'
Expand Down
Binary file added lib/fvim-win10-arm64.exe
Binary file not shown.
4 changes: 3 additions & 1 deletion pack.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Packs FVim for Windows platforms

param([string[]]$plat=("win7-x64","win-x64"))
param([string[]]$plat=("win7-x64","win-x64","win-arm"))
#param([string[]]$plat=("win7-x64","win-x64","linux-x64","osx-x64"))

New-Item -ItemType Directory -Force -Name publish -ErrorAction SilentlyContinue
Expand All @@ -16,6 +16,8 @@ foreach($i in $plat) {
Copy-Item ~/.nuget/packages/avalonia.angle.windows.natives/2.1.0.2020091801/runtimes/win7-x64/native/av_libglesv2.dll bin/Release/netcoreapp3.1/$i/publish/
} elseif ($i -eq "win7-x64") {
Copy-Item lib/fvim-win7.exe bin/Release/netcoreapp3.1/$i/publish/FVim.exe
} elseif ($i -eq "win-arm") {
Copy-Item lib/fvim-win10-arm64.exe bin/Release/netcoreapp3.1/$i/publish/FVim.exe
}
Compress-Archive -Path bin/Release/netcoreapp3.1/$i/publish/* -DestinationPath publish/fvim-$i.zip -Force
}
Expand Down
27 changes: 27 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# usage:
# pack.sh linux-x64
# pack.sh osx-x64
# pack.sh linux-arm
# pack.sh osx-arm

mkdir -p publish
rm -rf bin
Expand Down Expand Up @@ -38,6 +40,31 @@ function pack-linux-x64()
mv {*.deb,*.rpm} publish/
}

function pack-linux-arm()
{
rm -f ./{*.deb,*.rpm}

pushd $PKG_ROOT
cd ..
mv publish fvim
mkdir -p publish/usr/share
mkdir -p publish/usr/share/applications
mkdir -p publish/usr/share/icons/hicolor/48x48/apps/
mkdir -p publish/usr/bin
mv fvim publish/usr/share/
popd
cp lib/fvim-linux-launcher $PKG_ROOT/usr/bin/fvim
cp Assets/fvim.png $PKG_ROOT/usr/share/icons/hicolor/48x48/apps/fvim.png
cp lib/fvim.desktop $PKG_ROOT/usr/share/applications/fvim.desktop

chmod +x $PKG_ROOT/usr/share/fvim/FVim
chmod +x $PKG_ROOT/usr/bin/fvim
fpm -a arm64 -s dir -t deb -n fvim -v $VERSION -C $PKG_ROOT
fpm -a arm64 -s dir -t rpm -n fvim -v $VERSION -C $PKG_ROOT

mv {*.deb,*.rpm} publish/
}

function pack-osx-x64()
{
rm -rf ./*.app
Expand Down

0 comments on commit 646a86f

Please sign in to comment.