Skip to content

Commit

Permalink
Merge pull request #3 from elecordapp/build-config
Browse files Browse the repository at this point in the history
Update elecord build config
  • Loading branch information
hazzuk authored Dec 7, 2024
2 parents 1440eda + 42254ae commit 2c05041
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/cfp_headers
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
permissions-policy: accelerometer=(), gyroscope=(), magnetometer=(), usb=(), interest-cohort=()

/version
Content-Type: text/plain
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Build and Package
run: "./scripts/ci_package.sh"

- run: mv dist/element-*.tar.gz dist/elecord.tar.gz
- run: mv dist/elecord-*.tar.gz dist/elecord.tar.gz

- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ package-lock.json
electron/dist
electron/pub
**/.idea
/config.json
/config.json.*
/config.local*.json
# Legacy skinning file that some people might still have
/src/component-index.js
Expand Down
53 changes: 53 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"default_server_name": "matrix.org",
"default_server_config": {
"m.homeserver": {
"base_url": "https://matrix-client.matrix.org"
},
"m.identity_server": {
"base_url": "https://vector.im"
}
},
"brand": "elecord",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_widgets_urls": [
"https://scalar.vector.im/_matrix/integrations/v1",
"https://scalar.vector.im/api",
"https://scalar-staging.vector.im/_matrix/integrations/v1",
"https://scalar-staging.vector.im/api",
"https://scalar-staging.riot.im/scalar/api"
],
"bug_report_endpoint_url": "https://element.io/bugreports/submit",
"uisi_autorageshake_app": "element-auto-uisi",
"show_labs_settings": false,
"room_directory": {
"servers": ["matrix.org", "gitter.im"]
},
"enable_presence_by_hs_url": {
"https://matrix.org": false,
"https://matrix-client.matrix.org": false
},
"terms_and_conditions_links": [
{
"url": "https://element.io/privacy",
"text": "Privacy Policy"
},
{
"url": "https://element.io/cookie-policy",
"text": "Cookie Policy"
}
],
"privacy_policy_url": "https://element.io/cookie-policy",
"setting_defaults": {
"RustCrypto.staged_rollout_percent": 100
},
"features": {
"feature_video_rooms": true,
"feature_group_calls": true,
"feature_element_call_video_rooms": true
},
"element_call": {
"url": "https://call.element.io"
}
}
2 changes: 1 addition & 1 deletion scripts/ci_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -ex

rm dist/element-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
rm dist/elecord-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist

DIST_VERSION=`$(dirname $0)/get-version-from-git.sh`

Expand Down
13 changes: 8 additions & 5 deletions scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ VERSION=$version yarn build
# `yarn build`, but it's just too painful.
cp config.sample.json webapp/

# Copy any required files for deployment
cp .github/cfp_headers webapp/_headers

mkdir -p dist
cp -r webapp element-$version
cp -r webapp elecord-$version

# Just in case you have a local config, remove it before packaging
rm element-$version/config.json || true
# rm elecord-$version/config.json || true

# GNU/BSD compatibility workaround
tar_perms=(--owner=0 --group=0) && [ "$(uname)" == "Darwin" ] && tar_perms=(--uid=0 --gid=0)
tar "${tar_perms[@]}" -chvzf dist/element-$version.tar.gz element-$version
rm -r element-$version
tar "${tar_perms[@]}" -chvzf dist/elecord-$version.tar.gz elecord-$version
rm -r elecord-$version

echo
echo "Packaged dist/element-$version.tar.gz"
echo "Packaged dist/elecord-$version.tar.gz"

0 comments on commit 2c05041

Please sign in to comment.