Skip to content

Commit

Permalink
Fantom wailes Hello!
Browse files Browse the repository at this point in the history
Fantom used to be called Fan, but searching for that sucked so they went
with Fantom!

30 to go.
  • Loading branch information
frison committed Oct 31, 2024
1 parent c01c769 commit f0097f9
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p align="center">
<a href="https://hub.docker.com/r/100hellos" alt="DockerHub!">
<img src="https://img.shields.io/badge/Hello%20World!-31_to_go-yellow"
<img src="https://img.shields.io/badge/Hello%20World!-30_to_go-yellow"
height="130"></a>
</p>

Expand Down
16 changes: 16 additions & 0 deletions fantom/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# syntax=docker/dockerfile:1
# escape=\
FROM 100hellos/000-base:local

RUN sudo \
apk add --no-cache \
bash zip openjdk8

ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk

COPY --chown=human:human ./artifacts /artifacts
RUN cd /artifacts && make install

ENV PATH="/artifacts/fan/bin:${PATH}"

COPY --chown=human:human ./files /hello-world
1 change: 1 addition & 0 deletions fantom/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../Makefile.language-container.mk
19 changes: 19 additions & 0 deletions fantom/artifacts/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
PREFIX ?= /usr/local

.PHONY: install

# This is the only necessary target in the Makefile
# and it's expected to place the language interpretter
# or compiler in the path.
install:
curl -o fantom.zip -L https://github.com/fantom-lang/fantom/releases/download/v1.0.80/fantom-1.0.80.zip
unzip fantom.zip -d fantom
mv fantom/fantom-1.0.80 rel
chmod +x rel/bin/*
rm -rf fantom && rm -f fantom.zip
echo -e "\n\njdkHome=$$JAVA_HOME/\ndevHome=/artifacts/fan/\n" >> rel/etc/build/config.props
git clone --depth=1 https://github.com/fantom-lang/fantom fan
echo -e "\n\njdkHome=$$JAVA_HOME/" >> fan/etc/build/config.props
rel/bin/fan fan/src/buildall.fan superclean
rel/bin/fan fan/src/buildboot.fan compile
fan/bin/fan fan/src/buildpods.fan compile
12 changes: 12 additions & 0 deletions fantom/files/hello-world.fan
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env fan
using [java] java.lang

class HelloWorld
{

Void main()
{
System.out.println("Hello World!")
}

}

0 comments on commit f0097f9

Please sign in to comment.