Skip to content

Commit 02f909a

Browse files
Fix env variables and npm run build commands in several places (#1139)
I forgot to update them everywhere when I changed this.
2 parents 60ccf40 + 4842ce1 commit 02f909a

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

.github/create-release.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ fi
1616
npm ci
1717

1818
# Build version for root path installation
19-
export PUBLIC_URL=/
20-
npm run build
19+
export PUBLIC_PATH=/
20+
npm run build:release
2121

2222
FILENAME="oc-studio-$(date --utc +%F)-root.tar.gz"
2323
cd build
@@ -27,9 +27,9 @@ cd ..
2727

2828
# Build integrated version
2929
rm -rf build/
30-
export PUBLIC_URL=/studio
31-
export REACT_APP_SETTINGS_PATH="/ui/config/studio/settings.toml"
32-
npm run build
30+
export PUBLIC_PATH=/studio
31+
export SETTINGS_PATH="/ui/config/studio/settings.toml"
32+
npm run build:release
3333

3434
FILENAME="oc-studio-$(date --utc +%F)-integrated.tar.gz"
3535
cd build

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# Prepare test deployment
2222
- name: Build for test deployment
2323
env:
24-
REACT_APP_INCLUDE_LEGAL_NOTICES: 1
24+
INCLUDE_LEGAL_NOTICES: 1
2525
run: |
2626
builddate="$(date --utc '+%Y-%m-%d_%H-%M-%S')"
2727
buildno="$(printf '%06d' "${{ github.run_id }}")"
@@ -50,7 +50,7 @@ jobs:
5050
- name: Build for prod deployment
5151
if: github.repository_owner == 'elan-ev' && github.ref == 'refs/heads/master'
5252
env:
53-
REACT_APP_INCLUDE_LEGAL_NOTICES: 1
53+
INCLUDE_LEGAL_NOTICES: 1
5454
run: |
5555
rm -rf build
5656
npm run build:release

CONFIGURATION.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ further below for information on that.
2727
#
2828
# Is loaded by Studio in the beginning. Default path is "settings.toml"
2929
# (relative to current URL), but can be overwritten via the environment variable
30-
# `REACT_APP_SETTINGS_PATH` at build time.
30+
# `SETTINGS_PATH` at build time.
3131

3232

3333
[opencast]

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ To build Studio yourself, execute these commands:
118118
% git clone [email protected]:elan-ev/opencast-studio.git
119119
% cd opencast-studio
120120
% npm install
121-
% npm run build
121+
% npm run build:release # or npm run build:dev for development
122122
```
123123

124124
This will generate static content you can serve via any web server in `build/`.
@@ -128,7 +128,7 @@ If you prefer to run a local development server directly, you can use this
128128
instead:
129129

130130
```sh
131-
% npm run start
131+
% npm start
132132
```
133133

134134
### Additional Build Options
@@ -139,11 +139,11 @@ can apply these options by exporting them as environment variable before startin
139139

140140
```sh
141141
export OPTION=VALUE
142-
npm run build
142+
npm run build:release
143143
```
144144

145-
| Option | Example | Description
146-
| --------------------------------- | ------------------ | -----------
147-
| `PUBLIC_URL` | `/studio` | Path from which Studio will be served
148-
| `REACT_APP_SETTINGS_PATH` | `/mysettings.toml` | Path from which to load the configuration (see `CONFIGURATION.md` for more information)
149-
| `REACT_APP_INCLUDE_LEGAL_NOTICES` | `1` | Set to `1` to include legal notices and information about ELAN e.V., any other value or having this variable not set will not include them. Unless you are working for ELAN e.V. there is probably no reason for you to use this variable.
145+
| Option | Example | Description
146+
| ----------------------- | ------------------ | -----------
147+
| `PUBLIC_URL` | `/studio` | Path from which Studio will be served
148+
| `SETTINGS_PATH` | `/mysettings.toml` | Path from which to load the configuration (see `CONFIGURATION.md` for more information)
149+
| `INCLUDE_LEGAL_NOTICES` | `1` | Set to `1` to include legal notices and information about ELAN e.V., any other value or having this variable not set will not include them. Unless you are working for ELAN e.V. there is probably no reason for you to use this variable.

src/about.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export const About: React.FC<Props> = ({ close }) => (
101101
</li>
102102
</ul>
103103

104-
{/* process.env.REACT_APP_INCLUDE_LEGAL_NOTICES === '1' && <LegalNotices /> */}
105104
{DEFINES.showLegalNotices && <>
106105
<h2>ELAN e.V.</h2>
107106

src/settings.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ export class SettingsManager {
218218
}
219219

220220
/**
221-
* Attempts to load `settings.toml` (or REACT_APP_SETTINGS_PATH is that's
222-
* specified) from the server. If it fails for some reason, returns `null` and
223-
* prints an appropriate message on console.
221+
* Attempts to load `settings.toml` (or SETTINGS_PATH if that's specified)
222+
* from the server. If it fails for some reason, returns `null` and prints an
223+
* appropriate message on console.
224224
*/
225225
static async loadContextSettings() {
226226
// Try to retrieve the context settings.
@@ -229,9 +229,9 @@ export class SettingsManager {
229229
basepath += "/";
230230
}
231231

232-
// Construct path to settings file. If the `REACT_APP_SETTINGS_PATH` is
233-
// given and starts with '/', it is interpreted as absolute path from the
234-
// server root.
232+
// Construct path to settings file. If the `SETTINGS_PATH` is given and
233+
// starts with '/', it is interpreted as absolute path from the server
234+
// root.
235235
let settingsPath = DEFINES.settingsPath || CONTEXT_SETTINGS_FILE;
236236

237237
// If a custom file is given via query parameter, change the settings path

0 commit comments

Comments
 (0)