From 98a2e2c7a169c4bc7bff32ed1f33c1b1d3e26bfb Mon Sep 17 00:00:00 2001 From: Kobe Arthur Scofield Date: Mon, 29 Apr 2024 07:13:59 +0800 Subject: [PATCH] Adding notes for critical build file (#3308) * Adding notes for critical build file * Got trapped by Tabs and fix it --- .github/workflows/release.yml | 6 ++++++ Makefile | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d6476aa..26d14c14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,11 @@ name: Build and Release +# NOTE: This Github Actions file depends on the Makefile. +# Building the correct package requires the correct binaries generated by the Makefile. To +# ensure the correct output, the Makefile must accept the appropriate input and compile the +# correct file with the correct name. If you need to modify this file, please ensure it won't +# disrupt the Makefile. + on: workflow_dispatch: release: diff --git a/Makefile b/Makefile index ad6d13f0..6bb299c7 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,17 @@ NAME = xray VERSION=$(shell git describe --always --dirty) +# NOTE: This MAKEFILE can be used to build Xray-core locally and in Automatic workflows. It is \ + provided for convinience in automatic building and functions as a part of it. +# NOTE: If you need to modify this file, please be aware that:\ + - This file is not the main Makefile; it only accepts environment variables and builds the \ + binary.\ + - Automatic building expects the correct binaries to be built by this Makefile. If you \ + intend to propose a change to this Makefile, carefully review the file below and ensure \ + that the change will not accidently break the automatic building:\ + .github/workflows/release.yml \ + Otherwise it is recommended to contact the project maintainers. + LDFLAGS = -X github.com/xtls/xray-core/core.build=$(VERSION) -s -w -buildid= PARAMS = -trimpath -ldflags "$(LDFLAGS)" -v MAIN = ./main