Commit 1220d6ec authored by kaniini's avatar kaniini

remove myhtmlex references part 2

parent a2a685a5
Pipeline #19611 passed with stage
in 46 seconds
#!/bin/sh
start_dir=`pwd`
abort()
{
cd $start_dir
exit 1
}
trap 'abort' 0
set -e
make clean
test -d package-test || mkdir package-test
rm -rf package-test/*
mkdir package-test/myhtmlex-local
mix hex.build --unpack -o package-test/myhtmlex-local
cd package-test
mix new myhtmlex_pkg_test
cd myhtmlex_pkg_test
# Default operation
sed -i -e 's/^.*dep_from_hexpm.*$/ {:myhtmlex, path: "..\/myhtmlex-local"}/' mix.exs
mix deps.get
mix compile
mix run -e 'IO.inspect {"html", [], [{"head", [], []}, {"body", [], ["foo"]}]} = Myhtmlex.decode("foo")'
# Nif operation
sed -i -e 's/^.*myhtmlex-local.*$/ {:myhtmlex, path: "..\/myhtmlex-local", runtime: false}/' mix.exs
echo "config :myhtmlex, mode: Myhtmlex.Nif" >> config/config.exs
mix run -e 'IO.inspect {"html", [], [{"head", [], []}, {"body", [], ["foo"]}]} = Myhtmlex.decode("foo")'
trap : 0
cd $start_dir
echo "ok"
FROM ubuntu:trusty
RUN mkdir myhtmlex
WORKDIR myhtmlex
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y curl \
&& curl -LO https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb \
&& apt-get update \
&& apt-get install -y \
git \
esl-erlang \
elixir \
build-essential \
&& mix local.hex --force \
&& echo 'LANG=en_US.UTF-8' > /etc/default/locale \
&& echo 'LANGUAGE=en_US' >> /etc/default/locale
COPY . ./
# Test build
RUN mix deps.get \
&& make \
&& mix test \
&& mix bench \
&& make clean
# Test that it works as a dependency
RUN build-test/package.sh
FROM ubuntu:xenial
RUN mkdir myhtmlex
WORKDIR myhtmlex
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y curl \
&& curl -LO https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb \
&& apt-get update \
&& apt-get install -y \
git \
esl-erlang \
elixir \
build-essential \
&& mix local.hex --force \
&& echo 'LANG=en_US.UTF-8' > /etc/default/locale \
&& echo 'LANGUAGE=en_US' >> /etc/default/locale
COPY . ./
# Test build
RUN mix deps.get \
&& make \
&& mix test \
&& mix bench \
&& make clean
# Test that it works as a dependency
RUN build-test/package.sh
defmodule Myhtmlex.Mixfile do defmodule FastHTML.Mixfile do
use Mix.Project use Mix.Project
def project do def project do
[ [
app: :myhtmlex, app: :fast_html,
version: "0.2.1", version: "0.2.1",
elixir: "~> 1.5", elixir: "~> 1.5",
deps: deps(), deps: deps(),
package: package(), package: package(),
compilers: [:myhtmlex_make] ++ Mix.compilers(), compilers: [:my_html_worker_make] ++ Mix.compilers(),
build_embedded: Mix.env() == :prod, build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod, start_permanent: Mix.env() == :prod,
name: "Myhtmlex", name: "FastHTML",
description: """ description: """
A module to decode HTML into a tree, A module to decode HTML into a tree,
porting all properties of the underlying porting all properties of the underlying
library myhtml, being fast and correct library myhtml, being fast and correct
in regards to the html spec. in regards to the html spec.
Originally based on Myhtmlex.
""", """,
docs: docs() docs: docs()
] ]
...@@ -24,11 +26,11 @@ defmodule Myhtmlex.Mixfile do ...@@ -24,11 +26,11 @@ defmodule Myhtmlex.Mixfile do
def package do def package do
[ [
maintainers: ["Lukas Rieder"], maintainers: ["Ariadne Conill"],
licenses: ["GNU LGPL"], licenses: ["GNU LGPL"],
links: %{ links: %{
"Github" => "https://git.pleroma.social/pleroma/myhtmlex", "GitLab" => "https://git.pleroma.social/pleroma/fast_html",
"Issues" => "https://git.pleroma.social/pleroma/myhtmlex/issues", "Issues" => "https://git.pleroma.social/pleroma/fast_html/issues",
"MyHTML" => "https://github.com/lexborisov/myhtml" "MyHTML" => "https://github.com/lexborisov/myhtml"
}, },
files: [ files: [
...@@ -71,12 +73,12 @@ defmodule Myhtmlex.Mixfile do ...@@ -71,12 +73,12 @@ defmodule Myhtmlex.Mixfile do
defp docs do defp docs do
[ [
main: "Myhtmlex" main: "FastHTML"
] ]
end end
end end
defmodule Mix.Tasks.Compile.MyhtmlexMake do defmodule Mix.Tasks.Compile.MyHtmlWorkerMake do
@artifacts [ @artifacts [
"priv/myhtml_worker" "priv/myhtml_worker"
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment