code-server/ci/build/build-standalone-release.sh
dependabot[bot] 9042bbae9a
chore(deps-dev): bump prettier-plugin-sh from 0.6.1 to 0.7.1 (#3680)
* chore(deps-dev): bump prettier-plugin-sh from 0.6.1 to 0.7.1

Bumps [prettier-plugin-sh](https://github.com/rx-ts/prettier) from 0.6.1 to 0.7.1.
- [Release notes](https://github.com/rx-ts/prettier/releases)
- [Changelog](https://github.com/rx-ts/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rx-ts/prettier/compare/prettier-plugin-sh@0.6.1...prettier-plugin-sh@0.7.1)

---
updated-dependencies:
- dependency-name: prettier-plugin-sh
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: reformat shell scripts

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Akash Satheesan <akash.satheesan@protonmail.com>
2021-06-28 22:06:55 +05:30

33 lines
989 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2
# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057
export npm_config_build_from_source=true
main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
RELEASE_PATH+=-standalone
# We cannot find the path to node from $PATH because yarn shims a script to ensure
# we use the same version it's using so we instead run a script with yarn that
# will print the path to node.
local node_path
node_path="$(yarn -s node <<< 'console.info(process.execPath)')"
mkdir -p "$RELEASE_PATH/bin"
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
rsync "$node_path" "$RELEASE_PATH/lib/node"
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
ln -s "./lib/node" "$RELEASE_PATH/node"
cd "$RELEASE_PATH"
yarn --production --frozen-lockfile
}
main "$@"