From d9469bf5be305fc916c55d30054cb4f2fe5c1d14 Mon Sep 17 00:00:00 2001 From: snmsts Date: Wed, 11 Sep 2024 17:29:38 +0900 Subject: [PATCH] edit Makefile (change order) --- Makefile | 43 +++++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 326d051..0c207ce 100644 --- a/Makefile +++ b/Makefile @@ -2,37 +2,52 @@ -include .env export $(shell sed 's/=.*//' .env) -VERSION=`date +%y.%-m.%-d` -LAST_VERSION=`ros web.ros version` +VERSION ?= $(shell date +%y.%-m.%-d) ORIGIN_URI=https://github.com/sbcl/sbcl ORIGIN_REF=master GITHUB=https://github.com/roswell/sbcl_head -TSV_FILE=sbcl-bin_uri.tsv +TSV_FILE ?= sbcl-bin_uri.tsv +LAST_VERSION=$(shell ros web.ros version) +WEB_ROS_URI=https://raw.githubusercontent.com/roswell/sbcl_bin/master/web.ros + +clean: + rm -f hash lasthash + +#version +version: web.ros + @echo $(LAST_VERSION) > $@ +branch: version + $(eval VERSION := $(shell cat version)) + VERSION=$(VERSION) ros build.ros branch > $@ +latest-uris: web.ros + ros web.ros latests +web.ros: + curl -L -O $(WEB_ROS_URI) +#tag hash: git ls-remote --heads $(ORIGIN_URI) $(ORIGIN_REF) |sed -r "s/^([0-9a-fA-F]*).*/\1/" > hash lasthash: web.ros - curl -sSL -o lasthash $(GITHUB)/releases/download/$(LAST_VERSION)/hash + curl -sSL -o lasthash $(GITHUB)/releases/download/files/hash || touch lasthash tag: hash web.ros ($(MAKE) lasthash && diff -u hash lasthash) || \ ( VERSION=$(VERSION) ros web.ros upload-hash; \ + VERSION=$(VERSION) ros web.ros upload-hash; \ VERSION=files ros web.ros upload-hash) - +#tsv tsv: web.ros TSV_FILE=$(TSV_FILE) ros web.ros tsv upload-tsv: web.ros TSV_FILE=$(TSV_FILE) ros web.ros upload-tsv -version: web.ros - @echo $(LAST_VERSION) > version -web.ros: - curl -L -O https://raw.githubusercontent.com/roswell/sbcl_bin/master/web.ros - -clean: - rm -f hash lasthash - -table: +download-tsv: web.ros + VERSION=$(VERSION) ros web.ros get-tsv +#table +table: web.ros ros web.ros table +#archive +upload-archive: web.ros + VERSION=$(VERSION) TARGET=$(ARCH) SUFFIX=$(SUFFIX) ros web.ros upload-archive