Skip to content

Commit a2d93f2

Browse files
authored
Merge pull request #36 from roc-lang/install-changes
install fixes + 404 page
2 parents dc63a1b + 3b76f3b commit a2d93f2

File tree

9 files changed

+23
-14
lines changed

9 files changed

+23
-14
lines changed

.github/workflows/CI.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ jobs:
6262

6363
- name: Test install script (answer no to PATH)
6464
run: |
65-
cd website/content/installnew/install_scripts
65+
cd website/public
6666
bash install_roc.sh <<< "n"
6767
6868
- name: Verify installation (no PATH)
6969
run: |
70-
cd website/content/installnew/install_scripts
70+
cd website/public
7171
DIR_NAME="roc_nightly-${{ matrix.platform }}_${{ matrix.arch }}-${{ env.ROC_NIGHTLY_VERSION }}"
7272
if [ ! -d "$DIR_NAME" ]; then
7373
echo "Error: Installation directory $DIR_NAME not found"
@@ -76,18 +76,18 @@ jobs:
7676
7777
- name: Test roc binary (no PATH)
7878
run: |
79-
cd website/content/installnew/install_scripts
79+
cd website/public
8080
DIR_NAME="roc_nightly-${{ matrix.platform }}_${{ matrix.arch }}-${{ env.ROC_NIGHTLY_VERSION }}"
8181
"$DIR_NAME/roc" version
8282
8383
- name: Clean up for second test
8484
run: |
85-
cd website/content/installnew/install_scripts
85+
cd website/public
8686
rm -rf roc_nightly-*
8787
8888
- name: Test install script (answer yes to PATH)
8989
run: |
90-
cd website/content/installnew/install_scripts
90+
cd website/public
9191
bash install_roc.sh <<< "y"
9292
9393
- name: Verify PATH was updated
@@ -135,13 +135,13 @@ jobs:
135135
env:
136136
PROCESSOR_ARCHITECTURE: ${{ matrix.proc_arch }}
137137
run: |
138-
Set-Location website\content\installnew\install_scripts
138+
Set-Location website/public
139139
"n" | pwsh -ExecutionPolicy Bypass -File .\install_roc.ps1
140140
141141
- name: Verify installation (no PATH)
142142
shell: pwsh
143143
run: |
144-
Set-Location website\content\installnew\install_scripts
144+
Set-Location website/public
145145
$dirName = "roc_nightly-windows_${{ matrix.arch }}-${{ env.ROC_NIGHTLY_VERSION }}"
146146
if (-not (Test-Path $dirName)) {
147147
Write-Error "❌ Installation directory $dirName not found"
@@ -153,7 +153,7 @@ jobs:
153153
if: ${{ matrix.arch == 'x86_64' }}
154154
shell: pwsh
155155
run: |
156-
Set-Location website\content\installnew\install_scripts
156+
Set-Location website/public
157157
$dirName = "roc_nightly-windows_x86_64-${{ env.ROC_NIGHTLY_VERSION }}"
158158
$rocPath = Join-Path $dirName "roc.exe"
159159
if (-not (Test-Path $rocPath)) {
@@ -169,7 +169,7 @@ jobs:
169169
- name: Clean up for second test
170170
shell: pwsh
171171
run: |
172-
Set-Location website\content\installnew\install_scripts
172+
Set-Location website/public
173173
Get-Item .\roc_nightly-* -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force
174174
Write-Host "🧹 Cleaned up previous installation directories"
175175
@@ -178,7 +178,7 @@ jobs:
178178
env:
179179
PROCESSOR_ARCHITECTURE: ${{ matrix.proc_arch }}
180180
run: |
181-
Set-Location website\content\installnew\install_scripts
181+
Set-Location website/public
182182
"y" | pwsh -ExecutionPolicy Bypass -File .\install_roc.ps1
183183
184184
- name: Verify PATH was updated
@@ -207,7 +207,7 @@ jobs:
207207
shell: pwsh
208208
run: |
209209
$dirName = "roc_nightly-windows_${{ matrix.arch }}-${{ env.ROC_NIGHTLY_VERSION }}"
210-
$rocPath = Join-Path $PWD "website\content\installnew\install_scripts\$dirName\roc.exe"
210+
$rocPath = Join-Path $PWD "website/public\$dirName\roc.exe"
211211
212212
# Pull the updated user PATH and merge into current session
213213
$userPath = [System.Environment]::GetEnvironmentVariable("Path", "User")

website/build_website.roc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ write_builtins_redirects! = |{}|
350350
/builtins/Inspect /builtins/${redirect_version}/Inspect 301
351351
/builtins/Inspect/ /builtins/${redirect_version}/Inspect/ 301
352352
/builtins/Inspect/* /builtins/${redirect_version}/Inspect/:splat
353+
/* /404.html 404
353354
"""
354355
File.write_utf8!(redirects_content, "build/_redirects") ? CreateRedirectsFileFailed
355356

website/content/404.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Page Not Found
2+
3+
The page you're looking for doesn't exist.
4+
5+
If you believe this page should exist, you can:
6+
- Make a github issue [here](https://github.com/roc-lang/www.roc-lang.org/issues/new).
7+
- Or, tell us in the bugs topic on our [group chat](https://roc.zulipchat.com).

website/content/installnew/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- TODO docker release -->
99
- [Linux or macOS](/installnew/unix)
1010
- [Windows](/installnew/windows)
11-
- [Other Systems](/installnew/other)
11+
- [Other](/installnew/other)
1212

1313
<!-- TODO mention editor plugins once they are up to date -->
1414

website/content/installnew/unix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. Download the roc install script and execute it:
66

77
```sh
8-
curl --proto '=https' --tlsv1.2 -sSf https://roc-lang.org/installnew/install_roc.sh | sh
8+
curl --proto '=https' --tlsv1.2 -sSf https://roc-lang.org/install_roc.sh | sh
99
```
1010

1111
1. In a new terminal, download and run hello world:

website/content/installnew/windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
2. Download and run the Roc installer script:
88

99
```powershell
10-
irm https://roc-lang.org/installnew/install_roc.ps1 | pwsh
10+
irm https://roc-lang.org/install_roc.ps1 | pwsh
1111
```
1212
1313
> If your PowerShell says scripts are blocked, run PowerShell **as Administrator** just for the install, or start it like this:

website/static_site_gen.roc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ page_data =
6161
|> Dict.insert("/installnew/unix.html", { title: "Install on Unix | Roc", description: "Roc installation guide for Unix" })
6262
|> Dict.insert("/installnew/windows.html", { title: "Install on Windows | Roc", description: "Roc installation guide for Windows" })
6363
|> Dict.insert("/installnew/nix.html", { title: "Usage on Nix | Roc", description: "Roc usage guide for Nix" })
64+
|> Dict.insert("/404.html", { title: "Page Not Found | Roc", description: "The page you requested could not be found." })
6465

6566
get_page_info : Str -> { title : Str, description : Str }
6667
get_page_info = |page_path_str|

0 commit comments

Comments
 (0)