From 6450df047f8315e66f460a26328907c165070712 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sat, 2 Jan 2021 15:41:37 -0800 Subject: [PATCH] Configure more package managers --- Makefile | 19 ++++++++++++-- deps/prettier.yaml | 5 ++++ deps/sass.yaml | 5 ++++ docker/runtime/install.bash | 49 +++++++++++++++++++++++++++++++++---- langs/asciidoc.yaml | 2 ++ langs/bash.yaml | 2 ++ langs/befunge.yaml | 5 ++++ langs/bython.yaml | 4 +++ langs/chef.yaml | 3 +++ langs/clojurescript.yaml | 4 +++ langs/coffeescript.yaml | 4 +++ langs/confluence.yaml | 6 +++++ langs/dogescript.yaml | 4 +++ langs/dokuwiki.yaml | 6 +++++ langs/elm.yaml | 5 ++++ langs/fortran.yaml | 2 ++ langs/hy.yaml | 4 +++ langs/javascript.yaml | 2 ++ langs/less.yaml | 6 +++++ langs/livescript.yaml | 4 +++ langs/markdown.yaml | 6 +++++ langs/mediawiki.yaml | 6 +++++ langs/ocaml.yaml | 6 ++--- langs/org.yaml | 6 +++++ langs/perl.yaml | 3 +++ langs/php.yaml | 2 ++ langs/pikachu.yaml | 4 +++ langs/pug.yaml | 6 +++++ langs/purescript.yaml | 3 +++ langs/reasonml.yaml | 6 +++++ langs/restructuredtext.yaml | 6 +++++ langs/roff.yaml | 6 +++++ langs/ruby.yaml | 5 ++-- langs/sass.yaml | 4 +++ langs/scss.yaml | 5 ++++ langs/shakespeare.yaml | 5 +++- langs/slick.yaml | 4 +++ langs/textile.yaml | 6 +++++ langs/tikiwiki.yaml | 6 +++++ langs/twiki.yaml | 6 +++++ langs/typescript.yaml | 7 ++++++ langs/vim.yaml | 2 ++ langs/vimwiki.yaml | 6 +++++ langs/whitespace.yaml | 4 +++ langs/wolframlanguage.yaml | 6 ++--- langs/yaml.yaml | 2 ++ 46 files changed, 252 insertions(+), 17 deletions(-) create mode 100644 deps/prettier.yaml create mode 100644 deps/sass.yaml diff --git a/Makefile b/Makefile index fc52df4..6c3bea2 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ ifeq ($(I),composite) else ifneq (,$(filter $(I),admin ci)) docker build . -f docker/$(I)/Dockerfile -t riju:$(I) else - docker build . -f docker/$(I)/Dockerfile -t riju:$(I) --label riju.image-hash=$(shell node tools/hash-dockerfile.js $(I)) + hash="$$(node tools/hash-dockerfile.js $(I) | grep .)"; docker build . -f docker/$(I)/Dockerfile -t riju:$(I) --label riju.image-hash="$${hash}" endif .PHONY: script @@ -43,6 +43,10 @@ script: .PHONY: scripts scripts: + @: $${L} + node tools/make-foreach.js --types script L=$(L) + +.PHONY: all-scripts node tools/make-foreach.js --pkgs script .PHONY: pkg @@ -53,12 +57,23 @@ pkg: cd $(BUILD)/src && pkg="$(PWD)/$(BUILD)/pkg" ../build.bash fakeroot dpkg-deb --build $(BUILD)/pkg $(BUILD)/$(DEB) +.PHONY: pkgs +pkgs: + @: $${L} + node tools/make-foreach.js --types pkg L=$(L) + .PHONY: repkg repkg: @: $${L} $${T} + make script L=$(L) T=$(T) make shell I=packaging CMD="make pkg L=$(L) T=$(T)" ctr="$$(docker container ls -f label="riju-install-target=yes" -l -q)"; test "$${ctr}" || (echo "no valid container is live"; exit 1); docker exec "$${ctr}" make install L=$(L) T=$(T) +.PHONY: repkgs +repkgs: + @: $${L} + node tools/make-foreach.js --types repkg L=$(L) + ### Manipulate artifacts inside Docker VOLUME_MOUNT ?= $(PWD) @@ -172,7 +187,7 @@ upload: @: $${L} $${T} $${S3_BUCKET} aws s3 rm --recursive $(S3_HASH) aws s3 cp $(BUILD)/$(DEB) $(S3_DEB) - aws s3 cp - $(S3_HASH)/$(shell dpkg-deb -f $(BUILD)/$(DEB) Riju-Script-Hash) < /dev/null + hash="$$(dpkg-deb -f $(BUILD)/$(DEB) Riju-Script-Hash | grep .)"; aws s3 cp - "$(S3_HASH)/$${hash}" < /dev/null .PHONY: publish publish: diff --git a/deps/prettier.yaml b/deps/prettier.yaml new file mode 100644 index 0000000..6f11af6 --- /dev/null +++ b/deps/prettier.yaml @@ -0,0 +1,5 @@ +id: "prettier" + +install: + npm: + - prettier diff --git a/deps/sass.yaml b/deps/sass.yaml new file mode 100644 index 0000000..60892df --- /dev/null +++ b/deps/sass.yaml @@ -0,0 +1,5 @@ +id: "sass" + +install: + npm: + - sass diff --git a/docker/runtime/install.bash b/docker/runtime/install.bash index 382ffb5..c2aed00 100755 --- a/docker/runtime/install.bash +++ b/docker/runtime/install.bash @@ -10,22 +10,61 @@ pushd /tmp export DEBIAN_FRONTEND=noninteractive +dpkg --add-architecture i386 + apt-get update (yes || true) | unminimize apt-get install -y curl gnupg lsb-release -curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - -curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - +# Ceylon +curl -fsSL https://downloads.ceylon-lang.org/apt/ceylon-debian-repo.gpg.key | apt-key add - + +# Crystal +curl -fsSL https://keybase.io/crystal/pgp_keys.asc | apt-key add - + +# Dart +curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - + +# Hack +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B4112585D386EB94 + +# Node.js +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - + +# R +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 + +# Yarn +curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - ubuntu_ver="$(lsb_release -rs)" ubuntu_name="$(lsb_release -cs)" -node_repo="$(curl -sS https://deb.nodesource.com/setup_current.x | grep NODEREPO= | grep -Eo 'node_[0-9]+\.x' | head -n1)" +cran_repo="$(curl -fsSL https://cran.r-project.org/bin/linux/ubuntu/ | grep '' | grep "${ubuntu_name}" | grep -Eo 'cran[0-9]+' | head -n1)" +node_repo="$(curl -fsSL https://deb.nodesource.com/setup_current.x | grep NODEREPO= | grep -Eo 'node_[0-9]+\.x' | head -n1)" tee -a /etc/apt/sources.list.d/custom.list >/dev/null <