Merge pull request #1296 from tdesveauxPKFX/package-source-fix

Fix source packaging
This commit is contained in:
Samuel Surtees 2019-06-07 16:36:36 +10:00 committed by GitHub
commit b173d0890a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 12 deletions

11
.gitattributes vendored
View File

@ -1,11 +0,0 @@
# Setup archive tags
.DS_Store export-ignore
.gitignore export-ignore
.gitattributes export-ignore
.gitmodules export-ignore
.travis.yml export-ignore
.editorconfig export-ignore
appveyor.yml export-ignore
Bootstrap.* export-ignore
packages/* export-ignore

View File

@ -217,7 +217,23 @@ if kind == "source" then
print("Creating source code package...")
if not execQuiet("git add -f build") or
local excludeList = {
".gitignore",
".gitattributes",
".gitmodules",
".travis.yml",
".editorconfig",
"appveyor.yml",
"Bootstrap.*",
"packages/*",
}
local includeList = {
"build",
"src/scripts.c",
}
if not execQuiet("git rm --cached -r -f --ignore-unmatch "..table.concat(excludeList, ' ')) or
not execQuiet("git add -f "..table.concat(includeList, ' ')) or
not execQuiet("git stash") or
not execQuiet("git archive --format=zip -9 -o ../%s-src.zip --prefix=%s/ stash@{0}", pkgName, pkgName) or
not execQuiet("git stash drop stash@{0}")