MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/snap.cafsinfotech.in/node_modules/mapbox-gl/build/publish.sh
#!/bin/bash

# run npm publish for every tag; run as part of CI on AWS CodeBuild
git tag --points-at HEAD | while read tag; do

    disttag=$(echo $tag | grep -oP '^(v|style-spec@)\d+\.\d+\.\d+-?\K(\w+)?')
    disttag=${disttag:+next}
    disttag=${disttag:-latest}

    if [[ $tag =~ ^style-spec@ ]]; then
        cd src/style-spec
        spec_version=$(node -p "require('./package.json').version")
        echo "Publishing style-spec: $spec_version"

        if [[ -z $(npm view .@$spec_version) ]]; then
            echo "npm publish --tag $disttag"
            npm publish --tag $disttag
        else
            echo "Already published."
        fi
        cd ../..

    elif [[ $tag =~ ^v[0-9] ]]; then
        version=$(node -p "require('./package.json').version")
        echo "Publishing mapbox-gl: $version"

        if [[ -z $(npm view .@$version) ]]; then
            echo "npm publish --tag $disttag"
            npm publish --tag $disttag
        else
            echo "Already published."
        fi

    else
        echo "Unrecognized tag: $tag"
    fi
done