Skip to content

[Code scan] Make release packaging use the current checkout #24

Description

@njzjz

This issue comes from a Codex global scan of deepmodeling/tbplas at commit 4d3652b.

Severity: Medium

The release checklist says to run upload.sh, but only scripts/upload.sh is tracked. That script invokes scripts/pack.sh, and pack.sh packages $HOME/proj/tbplas instead of the checkout from which the release command is run. This can fail on machines without that path or upload stale source from a different tree.

Code references:

6. Run upload.sh to push the source code and documentation to www.tbplas.net.

tbplas/scripts/upload.sh

Lines 38 to 44 in 4d3652b

# Update src
msg "Uploading source code"
cd $top_dir
./scripts/pack.sh
scp tbplas.tar.* aliyun:$nginx_dir/attachments
ssh aliyun "cd $nginx_dir/attachments; md5sum tbplas.tar.* >> version"
rm tbplas.tar.*

tbplas/scripts/pack.sh

Lines 4 to 13 in 4d3652b

proj_dir=$HOME/proj/tbplas
items=$(ls $proj_dir) # It must be placed here!
top_dir=$(pwd)
# Copy items to destination
cd $top_dir
test -d tmp/tbplas && rm -rf tmp/tbplas
mkdir -p tmp/tbplas
for item in $items; do
cp -r $proj_dir/$item tmp/tbplas

Suggested fix: document the tracked script path and derive the package source directory from the script/repository location instead of $HOME/proj/tbplas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions