@@ -3,6 +3,7 @@ IMPORT := code.gitea.io/gitea
3
3
4
4
GO ?= go
5
5
SED_INPLACE := sed -i
6
+ SHASUM ?= shasum -a 256
6
7
7
8
export PATH := $($(GO ) env GOPATH) /bin:$(PATH )
8
9
@@ -327,7 +328,7 @@ release-windows:
327
328
fi
328
329
xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' windows/*' -out gitea-$(VERSION ) .
329
330
ifeq ($(CI ) ,drone)
330
- mv /build/* $(DIST)/binaries
331
+ cp /build/* $(DIST)/binaries
331
332
endif
332
333
333
334
.PHONY : release-linux
@@ -337,7 +338,7 @@ release-linux:
337
338
fi
338
339
xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' -linkmode external -extldflags "-static" $(LDFLAGS)' -targets ' linux/*' -out gitea-$(VERSION ) .
339
340
ifeq ($(CI ) ,drone)
340
- mv /build/* $(DIST)/binaries
341
+ cp /build/* $(DIST)/binaries
341
342
endif
342
343
343
344
.PHONY : release-darwin
@@ -347,23 +348,23 @@ release-darwin:
347
348
fi
348
349
xgo -dest $(DIST ) /binaries -tags ' netgo $(TAGS)' -ldflags ' $(LDFLAGS)' -targets ' darwin/*' -out gitea-$(VERSION ) .
349
350
ifeq ($(CI ) ,drone)
350
- mv /build/* $(DIST)/binaries
351
+ cp /build/* $(DIST)/binaries
351
352
endif
352
353
353
354
.PHONY : release-copy
354
355
release-copy :
355
- $( foreach file, $( wildcard $( DIST )/binaries/ $( EXECUTABLE ) - * ) , cp $( file ) $( DIST ) /release/$( notdir $( file ) ) ;)
356
+ cd $( DIST ); for file in ` find /build -type f -name " * " ` ; do cp $$ { file} . /release/; done ;
356
357
357
358
.PHONY : release-check
358
359
release-check :
359
- cd $(DIST ) /release; $( foreach file, $( wildcard $( DIST ) /release/ $( EXECUTABLE ) - * ) ,sha256sum $( notdir $( file ) ) > $( notdir $( file ) ) .sha256;)
360
+ cd $(DIST ) /release/ ; for file in ` find . -type f -name " * " ` ; do echo " checksumming $$ {file} " && $( SHASUM ) ` echo $$ {file} | sed ' s/^..// ' ` > $$ { file} .sha256; done ;
360
361
361
362
.PHONY : release-compress
362
363
release-compress :
363
364
@hash gxz > /dev/null 2>&1 ; if [ $$ ? -ne 0 ]; then \
364
365
$(GO ) get -u github.com/ulikunitz/xz/cmd/gxz; \
365
366
fi
366
- cd $(DIST ) /release; $( foreach file, $( wildcard $( DIST ) /binaries/ $( EXECUTABLE ) - * ) , gxz -k -9 $( notdir $( file ) ) ;)
367
+ cd $(DIST ) /release/ ; for file in ` find . -type f -name " * " ` ; do echo " compressing $$ {file} " && gxz -k -9 $$ { file} ; done ;
367
368
368
369
.PHONY : javascripts
369
370
javascripts : public/js/index.js
0 commit comments