Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
a74b20f2
Commit
a74b20f2
authored
Jul 17, 2015
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.zip for Win/Mac, .tar.gz for Linux/BSD
parent
95140f94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
dist/automate.sh
dist/automate.sh
+17
-8
No files found.
dist/automate.sh
View file @
a74b20f2
...
...
@@ -19,28 +19,37 @@ ReleaseDir=$DistDir/release
# Compile binaries
mkdir
-p
$BuildDir
cd
$BuildDir
rm
-f
*
rm
-f
caddy
*
gox
$Package
# Zip them up with release notes and stuff
mkdir
-p
$ReleaseDir
cd
$ReleaseDir
rm
-f
*
rm
-f
caddy
*
for
f
in
$BuildDir
/
*
do
# Name .zip file same as binary, but strip .exe from end
zipname
=
$(
basename
${
f
%
".exe"
}
)
.zip
zipname
=
$(
basename
${
f
%
".exe"
}
)
if
[[
$f
==
*
"linux"
*
]]
||
[[
$f
==
*
"bsd"
*
]]
;
then
zipname
=
${
zipname
}
.tar.gz
else
zipname
=
${
zipname
}
.zip
fi
# Binary inside the zip file is simply the project name
bin
=
$BuildDir
/
$(
basename
$Package
)
if
[[
$f
==
*
.exe
]]
then
bin
=
$bin
.exe
binbase
=
$(
basename
$Package
)
if
[[
$f
==
*
.exe
]]
;
then
binbase
=
$binbase
.exe
fi
bin
=
$BuildDir
/
$binbase
mv
$f
$bin
# Compress distributable
zip
-j
$zipname
$bin
$DistDir
/CHANGES.txt
$DistDir
/LICENSES.txt
$DistDir
/README.txt
if
[[
$zipname
==
*
.zip
]]
;
then
zip
-j
$zipname
$bin
$DistDir
/CHANGES.txt
$DistDir
/LICENSES.txt
$DistDir
/README.txt
else
tar
-cvzf
$zipname
-C
$BuildDir
$binbase
-C
$DistDir
CHANGES.txt LICENSES.txt README.txt
fi
# Put binary filename back to original
mv
$bin
$f
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment