1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2024-11-22 10:25:48 +01:00

CI: updated bundle script

This commit is contained in:
Romein van Buren 2023-06-22 11:37:35 +02:00
parent 0365e8e0ec
commit 43b059a579
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49
2 changed files with 29 additions and 10 deletions

View File

@ -1,6 +1,9 @@
#!/bin/sh
# Available platforms:
#
# This script bundles the binaries generated by GitHub Actions.
#
# Platforms to choose from:
# - windows-2019
# - windows-2022
# - macos-11
@ -8,13 +11,31 @@
# - macos-13
# - ubuntu-20.04
# - ubuntu-22.04
#
# Bundles to choose from:
# - rolens-macos-11-amd64.tar.gz
# - rolens-macos-11-arm64.tar.gz
# - rolens-macos-12-amd64.tar.gz
# - rolens-macos-12-arm64.tar.gz
# - rolens-macos-13-amd64.tar.gz
# - rolens-macos-13-arm64.tar.gz
# - rolens-ubuntu-20.04-amd64.tar.gz
# - rolens-ubuntu-22.04-amd64.tar.gz
# - rolens-windows-2019-amd64.zip
# - rolens-windows-2019-arm64.zip
# - rolens-windows-2022-amd64.zip
# - rolens-windows-2022-arm64.zip
#
node ./build/version2file.js
version=$(<./build/version.txt)
mkdir bundle
# mv artifacts/*/rolens-macos-11.zip bundle/
# mv artifacts/*/rolens-macos-11.zip bundle/
# macOS binaries
mv artifacts/*/rolens-macos-11-amd64.tar.gz bundle/rolens-$version-macos-amd64.tar.gz
mv artifacts/*/rolens-macos-11-arm64.tar.gz bundle/rolens-$version-macos-arm64.tar.gz
ls
echo "$version"
# Windows binaries
mv artifacts/*/rolens-windows-2019-amd64.zip bundle/rolens-$version-windows-amd64.zip
mv artifacts/*/rolens-windows-2019-arm64.zip bundle/rolens-$version-windows-arm64.zip

View File

@ -3,11 +3,9 @@
// This script extracts the version number from wails.json in the project root
// and writes it to version.txt
const fs = require('fs');
fs.writeFileSync(
__dirname+'/version.txt',
require('fs').writeFileSync(
__dirname + '/version.txt',
JSON.parse(
fs.readFileSync(__dirname+'/../wails.json')
fs.readFileSync(__dirname + '/../wails.json')
).info.productVersion
);