Skip to content

Commit

Permalink
edit Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
snmsts committed Oct 9, 2024
1 parent aed59b6 commit 074cc56
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,36 @@
export $(shell sed 's/=.*//' .env)

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

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
ORIGIN_URI=https://github.com/sbcl/sbcl
ORIGIN_REF=master
GITHUB=https://github.com/roswell/sbcl_head

#version
version: web.ros
@echo $(LAST_VERSION) > $@
@echo $(shell GH_USER=$(GH_USER) GH_REPO=$(GH_REPO) ros web.ros 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)
#tsv
tsv: web.ros
TSV_FILE=$(TSV_FILE) ros web.ros tsv
upload-tsv: web.ros
TSV_FILE=$(TSV_FILE) VERSION=$(VERSION) ros web.ros upload-tsv
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
#tag
hash:
git ls-remote --heads $(ORIGIN_URI) $(ORIGIN_REF) |sed -r "s/^([0-9a-fA-F]*).*/\1/" > hash
Expand All @@ -36,18 +45,6 @@ tag: hash web.ros
( 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

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
clean:
rm -f hash lasthash

0 comments on commit 074cc56

Please sign in to comment.