From e22bb394b94059cc44b8d0575db6b5c212af9f43 Mon Sep 17 00:00:00 2001 From: Jan Friedrich Date: Tue, 19 Mar 2024 11:59:50 +0100 Subject: [PATCH] #127 consolidated build in Dockerfile changed repository.url in package.json --- Dockerfile | 5 +++-- doc/BUILDING.md | 4 ++-- docker-build/.bashrc | 21 --------------------- docker-build/docker-build.sh | 21 --------------------- package.json | 2 +- 5 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 docker-build/.bashrc delete mode 100644 docker-build/docker-build.sh diff --git a/Dockerfile b/Dockerfile index 54966f8c..8a59a8a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,5 +31,6 @@ ENV DOTNET_ROOT=/root/.dotnet ENV PATH="$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools" ADD . /logging-log4net -RUN chmod +x /logging-log4net/docker-build/docker-build.sh -ADD ./docker-build/.bashrc /root/.bashrc \ No newline at end of file +RUN dotnet restore /logging-log4net/src/log4net.sln +RUN dotnet build /logging-log4net/src/log4net.sln +CMD /bin/bash \ No newline at end of file diff --git a/doc/BUILDING.md b/doc/BUILDING.md index ba9b297a..acd88889 100644 --- a/doc/BUILDING.md +++ b/doc/BUILDING.md @@ -17,12 +17,12 @@ TL;DR (Docker): - https://docs.docker.com/engine/install/ - in logging/log4net run - `docker build -t log4net-builder .` - - `docker run -it log4net-builder /bin/bash` + - `docker run -it log4net-builder` - this will - install all dependencies in the container - build src/log4net.sln - inside the container run - - `dotnet test ../src/log4net.sln` (gets printed after building) + - `dotnet test /logging-log4net/src/log4net.sln` TL;DR (!Windows): - install the dotnet SDK - v8 or better diff --git a/docker-build/.bashrc b/docker-build/.bashrc deleted file mode 100644 index cfac5bf8..00000000 --- a/docker-build/.bashrc +++ /dev/null @@ -1,21 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. - -# Note: PS1 and umask are already set in /etc/profile. You should not -# need this unless you want different defaults for root. -# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ ' -# umask 022 - -# You may uncomment the following lines if you want `ls' to be colorized: -export LS_OPTIONS='--color=auto' -#eval "`dircolors`" -alias ls='ls $LS_OPTIONS' -alias ll='ls $LS_OPTIONS -l' -alias l='ls $LS_OPTIONS -lA' -# -# Some more alias to avoid making mistakes: -# alias rm='rm -i' -# alias cp='cp -i' -# alias mv='mv -i' -cd /logging-log4net/docker-build -./docker-build.sh -echo "run 'dotnet test ../src/log4net.sln' for executing the unit tests" diff --git a/docker-build/docker-build.sh b/docker-build/docker-build.sh deleted file mode 100644 index db1b77d3..00000000 --- a/docker-build/docker-build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -dotnet restore /logging-log4net/src/log4net.sln -dotnet build /logging-log4net/src/log4net.sln -tree /logging-log4net/build \ No newline at end of file diff --git a/package.json b/package.json index 13065358..44a2596a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/fluffynuts/logging-log4net.git" + "url": "git+ssh://git@github.com/apache/logging-log4net.git" }, "author": "", "license": "Apache-2.0",