-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
22 lines (21 loc) · 1.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
release:
ifeq ($(TAG),)
$(error TAG not set.)
endif
sed -i "s/version = .*/version = \"$(shell echo $(TAG) | cut -c 2-)\"/" Project.toml && \
sed -i "s/jlpkg version [[:digit:]].[[:digit:]].[[:digit:]]/jlpkg version $(shell echo $(TAG) | cut -c 2-)/" src/cli.jl && \
sed -i "s/\/v[[:digit:]].[[:digit:]].[[:digit:]]\/jlpkg-v[[:digit:]].[[:digit:]].[[:digit:]].tar.gz/\/$(TAG)\/jlpkg-$(TAG).tar.gz/" README.md && \
sed -i "s/\/jlpkg\/v[[:digit:]].[[:digit:]].[[:digit:]]\/src\//\/jlpkg\/$(TAG)\/src\//" README.md && \
sed -i "s/jlpkg version [[:digit:]].[[:digit:]].[[:digit:]]/jlpkg version $(shell echo $(TAG) | cut -c 2-)/" src/jlpkg-completion.bash
julia --project -e 'using Pkg; Pkg.test()' && \
git commit -am "Set version to $(TAG)."
tarball:
git fetch origin && \
git checkout $(TAG) && \
rm -rf build/ && mkdir build && \
julia --project -e 'using jlpkg; jlpkg.install(julia="julia", destdir="build")' && \
tar -C build -czf build/jlpkg-$(TAG).tar.gz jlpkg && \
rm build/jlpkg && \
ghr $(TAG) build/ && \
rm -rf build && \
git checkout master