Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create assets with a script #186

Merged
merged 8 commits into from
Aug 22, 2018
Merged

Create assets with a script #186

merged 8 commits into from
Aug 22, 2018

Conversation

dvzrv
Copy link
Member

@dvzrv dvzrv commented Feb 25, 2018

This is an attempt to fix #184 by creating a script, that can be called from anywhere.
It will use /tmp to create assets (in the form of sc3-plugins-Version-x.x.x.tar.gz) and then place the finished tarball beneath package/.

There is one pitfall: It uses readlink -f (see get_absolute_path()), which doesn't seem to be around under macOS by default, but can be installed with the coreutils package using homebrew or macports.

If you know of a valid alternative, let me know. As a workaround the script currently moves the tarball to $HOME on macOS and the package folder on Linux.

IMHO this is a much cleaner solution, than doing this in a potential working copy directly (as it is done in the SuperCollider repository).

…mp) and a valid version tag. Might not work on macOS properly, because there's no readlink (install with brew/macports).
…ources() and adding more folders.

Unifying the moving of tarball by using output_dir (which is currently HOME for macOS and package dir for Linux.
Adding cleanup_source_dir() to remove versioned package directory. Removing unused function.
@dvzrv
Copy link
Member Author

dvzrv commented Feb 25, 2018

@snappizz @brianlheim it would be great if you could give some feedback on this, as I can not test it on macOS.

@dvzrv
Copy link
Member Author

dvzrv commented Feb 25, 2018

I just realized, this will also fix #134.

@telephon
Copy link
Member

…ectory as the script is in on macOS and Linux alike.
@dvzrv
Copy link
Member Author

dvzrv commented Mar 18, 2018

@telephon thanks a lot for the hint! I have corrected it (strange... searched for so long for a viable multi-architecture solution...). Feel free to test!
If there are more files to exclude, let me know.

@dvzrv
Copy link
Member Author

dvzrv commented Mar 18, 2018

Had the possibility to test this myself right now on macOS.
This seems to work.
However I'm adding a better help and failover, to make it less error prone to use this script!

…p() function. Revising getopts usage and defaulting to print_help in case of no input.
@dvzrv
Copy link
Member Author

dvzrv commented Mar 18, 2018

Also, I could add an option to sign the package with a given gpg key, if that's something @snappizz would be interested in doing when creating the assets.
In any case, I'd be happy to have this merged and applied any time now.

…ce tarball with a given ID/e-mail, when -s flag is provided.
@dvzrv
Copy link
Member Author

dvzrv commented Mar 21, 2018

Added non-mandatory function to sign tarballs with a given gpg ID/mail.

git clone $upstream
echo "Checking out version: Version-$version"
cd "$package_name"
git checkout "Version-$version"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvzrv This could be simplified to:
git clone $upstream --branch "Version-$version" --single-branch --recursive

That way checkout_external_libraries() wouldn't be needed anymore

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! that simplfies it a lot! :)

echo "$(cd "$(dirname "$0")" && pwd -P)"
}

remove_source_dir(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvzrv space missing here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't break, but is changed for consistency! :)

Copy link

@nhthn nhthn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

terribly sorry that it took me a ridiculously long time to look at this. thanks, just some minor issues.

if you don't have the time or interest to take care of these, let me know and i can push to this branch.


rename_sources() {
cd "${source_dir}"
mv -v "${package_name}" "${package_name}-Version-${version}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency with core, i'd prefer the naming convention ${package_name}-${version}-Source


compress_sources() {
cd "${source_dir}"
tar cvfz "${package_name}-Version-${version}.tar.tgz" \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and .tar.bz2 instead of .tar.tgz

@nhthn
Copy link

nhthn commented Aug 22, 2018

changed my mind -- i'm just going to merge this now and address the requested changes in a separate PR. thanks david!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

external libraries not included in release!
4 participants