Fix some bugs in manifest script
This commit is contained in:
parent
edb3c6b538
commit
4561f1809f
@ -41,9 +41,10 @@ const {
|
|||||||
manifestFile,
|
manifestFile,
|
||||||
version,
|
version,
|
||||||
fullZipFile,
|
fullZipFile,
|
||||||
incremental: [incrementalZipFile, deletionsFile],
|
incremental,
|
||||||
executable
|
executable
|
||||||
} = argParser.parseArgs();
|
} = argParser.parseArgs();
|
||||||
|
const [incrementalZipFile, deletionsFile] = incremental || [];
|
||||||
|
|
||||||
const manifest = JSON.parse(fs.readFileSync(manifestFile));
|
const manifest = JSON.parse(fs.readFileSync(manifestFile));
|
||||||
|
|
||||||
@ -60,7 +61,7 @@ const urlBase = "https://s3.wasabisys.com/ao-downloads/";
|
|||||||
manifest.versions = [{
|
manifest.versions = [{
|
||||||
version,
|
version,
|
||||||
executable,
|
executable,
|
||||||
prev: manifest.version[0] ? manifest.version[0].version : undefined,
|
prev: manifest.versions[0] ? manifest.versions[0].version : undefined,
|
||||||
full: fullZipFile ? [
|
full: fullZipFile ? [
|
||||||
{
|
{
|
||||||
action: "dl",
|
action: "dl",
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
# ARCHIVE_FULL: name of the full archive (if desired)
|
# ARCHIVE_FULL: name of the full archive (if desired)
|
||||||
# ARCHIVE_INCR: name of the incremental archive (if desired)
|
# ARCHIVE_INCR: name of the incremental archive (if desired)
|
||||||
# VERSION: name of the new version
|
# VERSION: name of the new version
|
||||||
|
# EXECUTABLE: name of the executable (if program manifest)
|
||||||
|
|
||||||
|
|
||||||
# -E: inherit ERR trap by shell functions
|
# -E: inherit ERR trap by shell functions
|
||||||
@ -25,11 +26,9 @@ export S3_COPY="aws s3 cp --endpoint-url=https://s3.wasabisys.com"
|
|||||||
export S3_MANIFESTS="s3://ao-manifests"
|
export S3_MANIFESTS="s3://ao-manifests"
|
||||||
export S3_ARCHIVES="s3://ao-downloads"
|
export S3_ARCHIVES="s3://ao-downloads"
|
||||||
|
|
||||||
#export VERSION=$(git describe --tags)
|
|
||||||
#export ARCHIVE_FULL="vanilla_full_${VERSION}_${ARTIFACT_SUFFIX}"
|
|
||||||
export ARCHIVE_FULL_ARG=""
|
export ARCHIVE_FULL_ARG=""
|
||||||
#export ARCHIVE_INCR="vanilla_update_${VERSION}_${ARTIFACT_SUFFIX}"
|
|
||||||
export ARCHIVE_INCR_ARG=""
|
export ARCHIVE_INCR_ARG=""
|
||||||
|
export EXECUTABLE_ARG=""
|
||||||
|
|
||||||
export LAST_TAGGED_VERSION=$(git rev-list --tags --skip=1 --max-count=1)
|
export LAST_TAGGED_VERSION=$(git rev-list --tags --skip=1 --max-count=1)
|
||||||
echo "Previous tagged version: ${LAST_TAGGED_VERSION}"
|
echo "Previous tagged version: ${LAST_TAGGED_VERSION}"
|
||||||
@ -57,9 +56,13 @@ if [[ -n $ARCHIVE_FULL ]]; then
|
|||||||
export ARCHIVE_FULL_ARG="-f ${ARCHIVE_FULL}"
|
export ARCHIVE_FULL_ARG="-f ${ARCHIVE_FULL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n $EXECUTABLE ]]; then
|
||||||
|
export EXECUTABLE_ARG="-e ${EXECUTABLE}"
|
||||||
|
fi
|
||||||
|
|
||||||
${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} .
|
${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} .
|
||||||
node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} \
|
node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} \
|
||||||
${ARCHIVE_FULL_ARG} ${ARCHIVE_INCR_ARG}
|
${ARCHIVE_FULL_ARG} ${ARCHIVE_INCR_ARG} ${EXECUTABLE}
|
||||||
|
|
||||||
if [[ -n $ARCHIVE_INCR_ARG ]]; then
|
if [[ -n $ARCHIVE_INCR_ARG ]]; then
|
||||||
${S3_COPY} ${ARCHIVE_INCR} ${S3_ARCHIVES}
|
${S3_COPY} ${ARCHIVE_INCR} ${S3_ARCHIVES}
|
||||||
|
Loading…
Reference in New Issue
Block a user