Skip to content

Commit 60bca54

Browse files
committed
fixies and added Makefile.sample.md
1 parent b97a8d6 commit 60bca54

File tree

6 files changed

+62
-14
lines changed

6 files changed

+62
-14
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
.vscode

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## 1.0.1 (2018-06-06)
2+
* Added Makefile.sample.mk
3+
* Added CHANGELOG.md
4+
5+
## 1.0.0 (2018-06-05)
6+
* Added simple installation script
7+
* Added **mk-version** and **mk-upgrade** commands
8+
* Added to self upgrade script with **mk-upgrade** command
9+
* Changed library from *.makefile-lib* to *mk-lib*
10+
* Added support of absolute paths
11+
* Added [website](https://kudlay.pro/docker-compose-makefile/)
12+
13+
## v0.9 (2017-11-21)
14+
* Initial version with basic functionality

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ USAGE
3939
SAMPLES
4040
-------
4141

42-
You may see sampess [here](https://github.com/krom/docker-compose-makefile/tree/master/samples)
42+
You may see samples [here](https://github.com/krom/docker-compose-makefile/tree/master/samples)
4343

4444
CUSTOMIZATION
4545
-------------

scripts/build.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
#!/usr/bin/env sh
22
echo "Building release"
3-
out=release/.mk-lib/
4-
mkdir -p $out
5-
cp -r src/* $out
6-
cp README.md $out
7-
cp LICENSE $out
8-
echo "MK_VERSION := $TRAVIS_TAG" > $out/version.mk
3+
OUT=release/.mk-lib
4+
5+
# Creating dir
6+
mkdir -p $OUT
7+
8+
# Coping files
9+
cp -r src/* $OUT
10+
cp README.md $OUT
11+
cp LICENSE $OUT
12+
cp CHANGELOG.md $OUT
13+
cp samples/Makefile $OUT/Makefile.sample.mk
14+
15+
# Writing current version
16+
echo "MK_VERSION := $TRAVIS_TAG" > $OUT/version.mk
17+
18+
# Compressing release to *.zip and *.tgz
919
tar -czf release.tgz -C release .
1020
cd release/; zip -r ../release.zip .; cd ..

scripts/install.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
1-
#/bin/sh
1+
#!/bin/sh
2+
3+
# Docker compose installation script
4+
# Execute this script with command
5+
# curl -sL https://git.io/vh4Gn | sh
6+
7+
# Main repo address
28
REPO=krom/docker-compose-makefile
9+
310
get_latest_release() {
411
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
512
grep '"tag_name":' | # Get tag line
613
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
714
}
815

9-
v=$(get_latest_release $REPO)
10-
release=https://github.com/$REPO/releases/download/$v/release.tgz
11-
echo Downloading version $v from $release
12-
curl -Ls $release | tar zxfm -
16+
# Getting URL to release archive
17+
V=$(get_latest_release $REPO)
18+
RELEASE=https://github.com/$REPO/releases/download/$V/release.tgz
19+
20+
# Downloading and extracting release
21+
echo Downloading version $V from $RELEASE
22+
curl -Ls $RELEASE | tar zxfm -
1323
echo 'Created .mk-lib'
24+
25+
# Creating Makefile if needed
1426
if [ -f Makefile ]; then
15-
echo "Makefile exists. Please add this section to the head of Makefile"
16-
cat .mk-lib/HEADER.mk
27+
echo "Makefile exists. Please add this section to the head of Makefile
28+
29+
-------------------------------------------------------------------------------"
30+
cat .mk-lib/HEADER.mk
31+
echo "-------------------------------------------------------------------------------
32+
"
1733
else
1834
cp .mk-lib/HEADER.mk Makefile
1935
echo "Created new Makefile. Feel free to add new commands"

scripts/upgrade.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
# Docker compose upgrading script
2+
# Execute this script with command
3+
# make mk-upgrade
4+
15
RELEASE=https://github.com/$MK_REPO/releases/download/$MK_VERSION/release.tgz
6+
7+
# Downloading new release
28
echo "Downloading version $MK_VERSION from $RELEASE"
39
curl -Ls $RELEASE | tar zxfm -
410
echo "Done"

0 commit comments

Comments
 (0)