Skip to content

Commit 9bae694

Browse files
authored
Merge pull request #315 from dividat/backport-disk-2023.9.1
Backport data partition increase and disk rebuilding for 2023.9.1-DISK
2 parents f6b3289 + 7d4b1a6 commit 9bae694

3 files changed

Lines changed: 33 additions & 13 deletions

File tree

.github/workflows/release-tag.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ on:
44
push:
55
tags:
66
- "*"
7+
workflow_dispatch:
8+
inputs:
9+
uploadDiskOnly:
10+
description: |
11+
If enabled, will only re-build and re-upload the release disk, without
12+
creating a new release. Uses the version of PlayOS defined in
13+
application.nix, without verifying that it matches the git tag.
14+
type: boolean
15+
default: false
16+
717

818
permissions:
919
contents: write
@@ -39,11 +49,18 @@ jobs:
3949
- name: Make magic-nix-cache read-only by removing post-build-hook
4050
run: sed -i '/post-build-hook = magic-nix-cache-build-hook/d' $HOME/.config/nix/nix.conf
4151

52+
- name: Get version from application.nix
53+
run: |
54+
PLAYOS_VERSION="$(nix eval --raw -f application.nix 'version')"
55+
56+
echo "PLAYOS_VERSION=$PLAYOS_VERSION" >> $GITHUB_ENV
57+
58+
4259
- name: Validate tag
60+
if: ${{ inputs.uploadDiskOnly != true }}
4361
run: |
44-
app_vsn="$(nix eval --raw -f application.nix 'version')"
45-
if [ "$app_vsn" != "$GITHUB_REF_NAME" ]; then
46-
echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($app_vsn), aborting!"
62+
if [ "$PLAYOS_VERSION" != "$GITHUB_REF_NAME" ]; then
63+
echo "Git tag ($GITHUB_REF_NAME) does not match version in application.nix ($PLAYOS_VERSION), aborting!"
4764
exit 1
4865
fi
4966
@@ -58,23 +75,25 @@ jobs:
5875
aws-region: eu-central-1
5976

6077
- name: Publish to S3
61-
run: ./.github/workflows/upload-test-disk.sh "$GITHUB_REF_NAME"
78+
run: ./.github/workflows/upload-test-disk.sh "$PLAYOS_VERSION"
6279

6380
- name: Create Release summary
64-
run: ./.github/workflows/gen-release-summary.sh "$GITHUB_REF_NAME" > ./release-notes.md
81+
if: ${{ inputs.uploadDiskOnly != true }}
82+
run: ./.github/workflows/gen-release-summary.sh "$PLAYOS_VERSION" > ./release-notes.md
6583

6684
- name: Create Release
85+
if: ${{ inputs.uploadDiskOnly != true }}
6786
env:
6887
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6988
run: |
7089
extra_args=""
71-
if [[ "$GITHUB_REF_NAME" == *VALIDATION ]]; then
90+
if [[ "$PLAYOS_VERSION" == *VALIDATION ]]; then
7291
extra_args="--prerelease"
73-
elif [[ "$GITHUB_REF_NAME" == *TEST ]]; then
92+
elif [[ "$PLAYOS_VERSION" == *TEST ]]; then
7493
extra_args="--draft"
7594
fi
7695
7796
gh release create --verify-tag \
7897
-F ./release-notes.md \
7998
$extra_args \
80-
"$GITHUB_REF_NAME"
99+
"$PLAYOS_VERSION"

installer/install-playos/install-playos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from datetime import datetime
1414

1515
PARTITION_SIZE_GB_SYSTEM = 9
16-
PARTITION_SIZE_GB_DATA = 1
16+
PARTITION_SIZE_GB_DATA = 2
1717

1818
GRUB_CFG = "@grubCfg@"
1919
GRUB_ENV = '/mnt/boot/grub/grubenv'

testing/disk/release.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
with pkgs;
1313
with lib;
1414
let
15-
# all sizes in MiB
15+
# NOTE: partSizes are hard-coded in install-playos, here only used for
16+
# computing the total diskSizeMiB
1617
partSizes = {
17-
boot = 525; # 525 MiB (matches install-playos default)
18-
system = 1024 * 9; # 9 GiB (install-playos default - 1GiB)
19-
data = 400; # 400 MiB (same as testing/disk/default.nix)
18+
boot = 525; # 525 MiB
19+
system = 1000 * 9; # 9 GB
20+
data = 2000; # 2000 MB
2021
};
2122
diskSizeMiB = 8 + partSizes."boot" + partSizes."data" + (partSizes."system" * 2) + 1;
2223
in

0 commit comments

Comments
 (0)