Skip to content

Commit

Permalink
Register functions to the plugins module namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklax committed Oct 7, 2022
1 parent 56ee6bf commit 610735c
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get install -y apt-transport-https
RUN wget -qO - https://raw.githubusercontent.com/halon/changelog/master/pgp-keys/7F0A73B5.asc | apt-key add -
RUN echo "deb https://repo.halon.io/ focal stable" >> /etc/apt/sources.list.d/halon.list
RUN echo "machine repo.halon.io login ${HALON_REPO_USER} password ${HALON_REPO_PASS}" >> /etc/apt/auth.conf
RUN apt-get update && apt-get install -y halon=5.8.3
RUN apt-get update && apt-get install -y halon=5.10.0

RUN /usr/bin/install -d /var/run/halon
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

PROJECT("time-rfc2822" VERSION 1.0.0)
PROJECT("time-rfc2822" VERSION 1.1.0)

# RPM/DEB and CENTOS7/CENTOS8/UBU1804/UBU2004/UBU2204
IF (EXISTS "${CMAKE_CURRENT_BINARY_DIR}/OSRELEASE.txt")
Expand Down Expand Up @@ -59,12 +59,12 @@ SET(CPACK_PACKAGING_INSTALL_PREFIX "/opt/halon")

IF (CPACK_GENERATOR MATCHES "DEB")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "halon (>= 5.8)")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "halon (>= 5.10)")
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/postinst;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
ENDIF()
IF (CPACK_GENERATOR MATCHES "RPM")
SET(CPACK_RPM_PACKAGE_AUTOREQPROV ON)
SET(CPACK_RPM_PACKAGE_REQUIRES "halon >= 5.8")
SET(CPACK_RPM_PACKAGE_REQUIRES "halon >= 5.10")
SET(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/postinst")
SET(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/postrm")
ENDIF()
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ On success it will return a string that contains the time in RFC2822 format. On
**Example**

```
import { time_rfc2822 } from "extras://time-rfc2822";
echo time_rfc2822();
echo time_rfc2822(1645012689.519825);
echo time_rfc2822(time(), "Europe/Stockholm");
Expand Down
4 changes: 2 additions & 2 deletions build/centos-7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM centos:7
FROM --platform=linux/amd64 centos:7
LABEL org.opencontainers.image.authors="support@halon.io"

ARG HALON_REPO_USER
Expand All @@ -12,7 +12,7 @@ RUN echo "baseurl=https://${HALON_REPO_USER}:${HALON_REPO_PASS}@repo.halon.io/di
RUN echo "gpgcheck=1" >> /etc/yum.repos.d/Halon.repo
RUN echo "gpgkey=https://raw.githubusercontent.com/halon/changelog/master/pgp-keys/7F0A73B5.asc" >> /etc/yum.repos.d/Halon.repo
RUN echo "enabled=1" >> /etc/yum.repos.d/Halon.repo
RUN yum install -y halon-5.8.0
RUN yum install -y halon-5.10.0

RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-8
Expand Down
4 changes: 2 additions & 2 deletions build/centos-8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rockylinux/rockylinux:8
FROM --platform=linux/amd64 rockylinux/rockylinux:8
LABEL org.opencontainers.image.authors="support@halon.io"

ARG HALON_REPO_USER
Expand All @@ -12,7 +12,7 @@ RUN echo "baseurl=https://${HALON_REPO_USER}:${HALON_REPO_PASS}@repo.halon.io/di
RUN echo "gpgcheck=1" >> /etc/yum.repos.d/Halon.repo
RUN echo "gpgkey=https://raw.githubusercontent.com/halon/changelog/master/pgp-keys/7F0A73B5.asc" >> /etc/yum.repos.d/Halon.repo
RUN echo "enabled=1" >> /etc/yum.repos.d/Halon.repo
RUN yum install -y halon-5.8.0
RUN yum install -y halon-5.10.0

RUN yum install -y cmake3 make gcc-c++ rpm-build curl

Expand Down
18 changes: 9 additions & 9 deletions build/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
services:
# ubuntu-22.04:
# build:
# context: ./ubuntu-22.04
# dockerfile: ./Dockerfile
# args:
# HALON_REPO_USER: ${HALON_REPO_USER}
# HALON_REPO_PASS: ${HALON_REPO_PASS}
# volumes:
# - ../:/plugin
ubuntu-22.04:
build:
context: ./ubuntu-22.04
dockerfile: ./Dockerfile
args:
HALON_REPO_USER: ${HALON_REPO_USER}
HALON_REPO_PASS: ${HALON_REPO_PASS}
volumes:
- ../:/plugin
ubuntu-20.04:
build:
context: ./ubuntu-20.04
Expand Down
4 changes: 2 additions & 2 deletions build/ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM --platform=linux/amd64 ubuntu:18.04
LABEL org.opencontainers.image.authors="support@halon.io"

ARG HALON_REPO_USER
Expand All @@ -12,7 +12,7 @@ RUN apt-get install -y apt-transport-https
RUN wget -qO - https://raw.githubusercontent.com/halon/changelog/master/pgp-keys/7F0A73B5.asc | apt-key add -
RUN echo "deb https://repo.halon.io/ bionic stable" >> /etc/apt/sources.list.d/halon.list
RUN echo "machine repo.halon.io login ${HALON_REPO_USER} password ${HALON_REPO_PASS}" >> /etc/apt/auth.conf
RUN apt-get update && apt-get install -y halon=5.8.0
RUN apt-get update && apt-get install -y halon=5.10.0

RUN apt-get install -y build-essential cmake git curl

Expand Down
4 changes: 2 additions & 2 deletions build/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM --platform=linux/amd64 ubuntu:20.04
LABEL org.opencontainers.image.authors="support@halon.io"

ARG HALON_REPO_USER
Expand All @@ -12,7 +12,7 @@ RUN apt-get install -y apt-transport-https
RUN wget -qO - https://raw.githubusercontent.com/halon/changelog/master/pgp-keys/7F0A73B5.asc | apt-key add -
RUN echo "deb https://repo.halon.io/ focal stable" >> /etc/apt/sources.list.d/halon.list
RUN echo "machine repo.halon.io login ${HALON_REPO_USER} password ${HALON_REPO_PASS}" >> /etc/apt/auth.conf
RUN apt-get update && apt-get install -y halon=5.8.0
RUN apt-get update && apt-get install -y halon=5.10.0

RUN apt-get install -y build-essential cmake git curl

Expand Down
2 changes: 1 addition & 1 deletion build/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM --platform=linux/amd64 ubuntu:22.04
LABEL org.opencontainers.image.authors="support@halon.io"

ARG HALON_REPO_USER
Expand Down
1 change: 1 addition & 0 deletions time-rfc2822.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,6 @@ func time_rfc2822(hhc *C.HalonHSLContext, args *C.HalonHSLArguments, ret *C.Halo
func Halon_hsl_register(hhrc *C.HalonHSLRegisterContext) C.bool {
time_rfc2822_cs := C.CString("time_rfc2822")
C.HalonMTA_hsl_register_function(hhrc, time_rfc2822_cs, nil)
C.HalonMTA_hsl_module_register_function(hhrc, time_rfc2822_cs, nil)
return true
}

0 comments on commit 610735c

Please sign in to comment.