Add NPM package, debs, rpms and refactor CI/build process

Closes many issues that I'll prune after adding more docs
for users.
This commit is contained in:
Anmol Sethi
2020-04-30 07:52:54 -04:00
parent 4875f6aa87
commit be032cf735
42 changed files with 867 additions and 631 deletions

24
ci/build/build-static-pkgs.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
# Generates deb and rpm packages for CI.
# Assumes a static release has already been built.
main() {
cd "$(dirname "${0}")/../.."
source ./ci/lib.sh
VERSION="$(pkg_json_version)"
export VERSION
ARCH="$(arch)"
export ARCH
local nfpm_config
nfpm_config=$(envsubst < ./ci/build/nfpm.yaml)
nfpm pkg -f <(echo "$nfpm_config") --target release-github/code-server-"$VERSION-$ARCH.deb"
nfpm pkg -f <(echo "$nfpm_config") --target release-github/code-server-"$VERSION-$ARCH.rpm"
}
main "$@"