mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Fix the root folder name inside CI-built archives
They use HEAD as the branch name, because CI scripting was only fixing the names of the built archives.
This commit is contained in:
@@ -37,9 +37,6 @@ after_test:
|
||||
# AppVeyor checks out a specific commit, but that means the archive script
|
||||
# can't tell which branch it's on, so rename the 7z archives.
|
||||
- ps: $env:GIT_DESCRIBE = ((git describe --tags --long) | Out-String) -replace "`n|`r", ""
|
||||
- ps: mv "build\loot_$($env:GIT_DESCRIBE)_HEAD.7z" "build\loot_$($env:GIT_DESCRIBE)_$($env:APPVEYOR_REPO_BRANCH).7z"
|
||||
- ps: mv "build\loot-api_$($env:GIT_DESCRIBE)_HEAD.7z" "build\loot-api_$($env:GIT_DESCRIBE)_$($env:APPVEYOR_REPO_BRANCH).7z"
|
||||
- ps: mv "build\metadata-validator_$($env:GIT_DESCRIBE)_HEAD.7z" "build\metadata-validator_$($env:GIT_DESCRIBE)_$($env:APPVEYOR_REPO_BRANCH).7z"
|
||||
|
||||
artifacts:
|
||||
- path: build\loot_$(GIT_DESCRIBE)_$(APPVEYOR_REPO_BRANCH).7z
|
||||
|
||||
+11
-1
@@ -22,12 +22,22 @@ function getGitDescription() {
|
||||
'--tags',
|
||||
'--long',
|
||||
])).slice(0, -1);
|
||||
const branch = String(childProcess.execFileSync('git', [
|
||||
let branch = String(childProcess.execFileSync('git', [
|
||||
'rev-parse',
|
||||
'--abbrev-ref',
|
||||
'HEAD',
|
||||
])).slice(0, -1);
|
||||
|
||||
/* On AppVeyor and Travis CI, a specific commit is checked out, so the branch
|
||||
is HEAD. Use their stored branch value instead. */
|
||||
if (branch === 'HEAD') {
|
||||
if (process.env.APPVEYOR_REPO_BRANCH) {
|
||||
branch = process.env.APPVEYOR_REPO_BRANCH;
|
||||
} else if (process.env.TRAVIS_BRANCH) {
|
||||
branch = process.env.TRAVIS_BRANCH;
|
||||
}
|
||||
}
|
||||
|
||||
return `${describe}_${branch}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user