diff --git a/.github/workflows/manual-nightly.yml b/.github/workflows/manual-nightly.yml index 333f5e2ac18..097b87eeef4 100644 --- a/.github/workflows/manual-nightly.yml +++ b/.github/workflows/manual-nightly.yml @@ -27,7 +27,6 @@ jobs: runs-on: ubuntu-24.04 # runs release manually for a TAG if: github.repository == 'openframeworks/openframeworks' && startsWith(github.ref, 'refs/tags/') - #if: github.repository == 'openframeworks/openframeworks' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') strategy: matrix: cfg: @@ -39,16 +38,12 @@ jobs: run: | if [[ "${{ github.ref }}" == refs/tags/* ]]; then echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV - echo "PRERELEASE=false" >> $GITHUB_ENV elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then echo "RELEASE=nightly" >> $GITHUB_ENV - echo "PRERELEASE=false" >> $GITHUB_ENV elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then echo "RELEASE=latest" >> $GITHUB_ENV - echo "PRERELEASE=true" >> $GITHUB_ENV else echo "RELEASE=latest" >> $GITHUB_ENV - echo "PRERELEASE=true" >> $GITHUB_ENV fi - name: Install libunwind run: sudo apt-get install libunwind-dev @@ -85,7 +80,6 @@ jobs: path: out/manual-mega_artefact.tar.bz2 retention-days: 1 - name: Update Release arm64 - if: github.repository == 'openframeworks/openframeworks' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') uses: softprops/action-gh-release@v2.1.0 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/nightly-linux64.yml b/.github/workflows/nightly-linux64.yml index 9a7c36c64c1..b5c4a6780dc 100644 --- a/.github/workflows/nightly-linux64.yml +++ b/.github/workflows/nightly-linux64.yml @@ -50,16 +50,12 @@ jobs: run: | if [[ "${{ github.ref }}" == refs/tags/* ]]; then echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV - echo "PRERELEASE=false" >> $GITHUB_ENV elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then echo "RELEASE=nightly" >> $GITHUB_ENV - echo "PRERELEASE=false" >> $GITHUB_ENV elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then echo "RELEASE=latest" >> $GITHUB_ENV - echo "PRERELEASE=true" >> $GITHUB_ENV else echo "RELEASE=latest" >> $GITHUB_ENV - echo "PRERELEASE=true" >> $GITHUB_ENV fi - name: Install libunwind run: sudo apt-get install libunwind-dev @@ -95,7 +91,6 @@ jobs: path: out/nightly-mega_artefact.tar.bz2 retention-days: 7 - name: Update Release arm64 - if: github.repository == 'openframeworks/openframeworks' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') uses: softprops/action-gh-release@v2.1.0 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/of.yml b/.github/workflows/of.yml index c5149527d68..653a6916ea6 100644 --- a/.github/workflows/of.yml +++ b/.github/workflows/of.yml @@ -32,6 +32,19 @@ jobs: - uses: actions/checkout@v4 - name: Docker Step run: "docker run -di --name emscripten -v $PWD:/src emscripten/emsdk:3.1.21 bash" + - name: Determine Release + id: vars + shell: bash + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + echo "RELEASE=nightly" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then + echo "RELEASE=latest" >> $GITHUB_ENV + else + echo "RELEASE=latest" >> $GITHUB_ENV + fi - name: Download libs run: ./scripts/$TARGET/download_libs.sh - name: Install dependencies @@ -112,10 +125,23 @@ jobs: install: >- git unzip + - name: Determine Release + id: vars + shell: bash + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + echo "RELEASE=nightly" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then + echo "RELEASE=latest" >> $GITHUB_ENV + else + echo "RELEASE=latest" >> $GITHUB_ENV + fi - name: Install dependencies shell: msys2 {0} run: - ./scripts/ci/vs/install_bleeding.sh + ./scripts/ci/vs/install.sh - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 - name: Build DEBUG and RELEASE emptyExample @@ -149,16 +175,26 @@ jobs: with: packages: multistrap unzip gcc-${{matrix.cfg.suffix}} g++-${{matrix.cfg.suffix}} version: 1.0 - - uses: actions/checkout@v4 - - name: ccache uses: hendrikmuhs/ccache-action@v1.2.14 with: key: ${{ matrix.cfg.libs }} - + - name: Determine Release + id: vars + shell: bash + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + echo "RELEASE=nightly" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then + echo "RELEASE=latest" >> $GITHUB_ENV + else + echo "RELEASE=latest" >> $GITHUB_ENV + fi - name: Download libs - run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}}; + run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}} -t $RELEASE; - name: Install dependencies run: ./scripts/ci/linuxrpi/install.sh; - name: Build @@ -182,9 +218,21 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.14 with: key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }} - + - name: Determine Release + id: vars + shell: bash + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + echo "RELEASE=nightly" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then + echo "RELEASE=latest" >> $GITHUB_ENV + else + echo "RELEASE=latest" >> $GITHUB_ENV + fi - name: Download libs - run: ./scripts/${{matrix.cfg.libs}}/download_libs.sh + run: ./scripts/${{matrix.cfg.libs}}/download_libs.sh -t $RELEASE - name: install run: ./scripts/ci/$TARGET/install.sh - name: Build @@ -214,7 +262,19 @@ jobs: with: packages: aptitude aptitude-common libboost-iostreams1.83.0 libcwidget4 libsigc++-2.0-0v5 libxapian30 fonts-wine{a} libasound2-plugins{a} libcapi20-3t64{a} libosmesa6{a} libpcsclite1{a} libspeexdsp1{a} libwine{a} libxkbregistry0{a} libz-mingw-w64{a} wine{a} wine64 wget2 make libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good version: 1.0 - + - name: Determine Release + id: vars + shell: bash + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + echo "RELEASE=nightly" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then + echo "RELEASE=latest" >> $GITHUB_ENV + else + echo "RELEASE=latest" >> $GITHUB_ENV + fi - uses: actions/checkout@v4 - name: ccache uses: hendrikmuhs/ccache-action@v1.2.14 @@ -222,7 +282,7 @@ jobs: key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }} - name: Download libs - run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}}; + run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}} -t $RELEASE; - name: Install dependencies run: ./scripts/ci/$TARGET/install.sh; - name: Build @@ -289,9 +349,23 @@ jobs: with: key: ${{ matrix.cfg.target }}-${{ matrix.cfg.opt }} + - name: Determine Release + id: vars + shell: bash + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + echo "RELEASE=nightly" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then + echo "RELEASE=latest" >> $GITHUB_ENV + else + echo "RELEASE=latest" >> $GITHUB_ENV + fi + - name: Download libs - run: ./scripts/${{ matrix.cfg.target }}/download_libs.sh + run: ./scripts/${{ matrix.cfg.target }}/download_libs.sh -t $RELEASE - name: Build run: diff --git a/scripts/ci/package_builds.sh b/scripts/ci/package_builds.sh index 6dacfe4caf4..d4cf5a113a6 100755 --- a/scripts/ci/package_builds.sh +++ b/scripts/ci/package_builds.sh @@ -31,6 +31,8 @@ ls OUTPUT_FOLDER=$ROOT/out mkdir -p $OUTPUT_FOLDER +RELEASE="${RELEASE:-latest}" + lastversion=$(date +%Y%m%d) if [ -n "$1" ] && [ "$1" != "nightly" ]; then lastversion=$1 diff --git a/scripts/ci/simulate_nightly.sh b/scripts/ci/simulate_nightly.sh index 5d6a017834c..9edaed045e4 100755 --- a/scripts/ci/simulate_nightly.sh +++ b/scripts/ci/simulate_nightly.sh @@ -59,7 +59,7 @@ $OF_ROOT/scripts/dev/init_submodules.sh # Download libraries echo "Downloading libraries..." -$OF_ROOT/scripts/linux/download_libs.sh -a $LIBS +$OF_ROOT/scripts/linux/download_libs.sh -a $LIBS -t $RELEASE # Create package echo "Creating package..." diff --git a/scripts/ci/vs/install.sh b/scripts/ci/vs/install.sh index a7061ff4dea..063e8ecea9a 100755 --- a/scripts/ci/vs/install.sh +++ b/scripts/ci/vs/install.sh @@ -1,21 +1,59 @@ OF_ROOT=$PWD SCRIPT_DIR="${BASH_SOURCE%/*}" + +RELEASE="${RELEASE:-nightly}" + if [[ ! -d "$SCRIPT_DIR" ]]; then SCRIPT_DIR="$PWD"; fi . "$SCRIPT_DIR/../../dev/downloader.sh" -${OF_ROOT}/scripts/vs/download_libs.sh -p vs --silent +unset BITS +cd "${OF_ROOT}" +./scripts/vs/download_libs.sh -p vs --silent -t $RELEASE -cd ~/ rm -rf projectGenerator -mkdir -p ~/projectGenerator -cd ~/projectGenerator +mkdir -p projectGenerator +cd projectGenerator + +if [[ "$RELEASE" == "nightly" ]] || [[ "$RELEASE" == "latest" ]]; then + echo "Downloading nightly projectGenerator from Github Latest" + URL="https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs.zip" +else + echo "Downloading projectGenerator for release $RELEASE from Github" + URL="https://github.com/openframeworks/projectGenerator/releases/download/$RELEASE/projectGenerator-vs.zip" +fi echo "Downloading projectGenerator from Github Nightly" -downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs.zip 2> /dev/null +downloader $URL 2> /dev/null unzip projectGenerator-vs.zip 2> /dev/null rm projectGenerator-vs.zip -cd $OF_ROOT -PG_OF_PATH=$OF_ROOT ~/projectGenerator/projectGenerator.exe examples/templates/emptyExample -PG_OF_PATH=$OF_ROOT ~/projectGenerator/projectGenerator.exe examples/templates/allAddonsExample +cd "${OF_ROOT}" + +OFW_ROOT=$(cygpath -w "$PWD") +PG_OFX_PATH="${OF_ROOT}\\projectGenerator\\projectGenerator.exe" +PG_OF_PATH="${OF_ROOT}/projectGenerator/projectGenerator.exe" + +PGW_OFX_PATH=$(cygpath -w "$PG_OF_PATH") + +PROJECTS=( + "examples\\templates\\emptyExample" + "examples\\templates\\allAddonsExample" +) + +ADDONS=( + "" + "ofxAssimpModelLoader,ofxGui,ofxKinect,ofxNetwork,ofxOpenCv,ofxOsc,ofxSvg,ofxThreadedImageLoader,ofxXmlSettings" +) + +echo "Updating projects with PG at:${PG_OF_PATH}" + +for i in "${!PROJECTS[@]}"; do + PROJECT=${PROJECTS[i]} + ADDON=${ADDONS[i]} + OPTIONS="-o\"${OF_ROOT}\" -v -a\"$ADDON\" -p\"vs\" -t\"\" \"${OF_ROOT}\\${PROJECT}\"" + # Run the project generator executable with the combined options + echo "Updating: ${PROJECT} with:${PG_OF_PATH}" + #cmd.exe /c "${PG_OF_PATH} ${OPTIONS}" + eval "${PG_OF_PATH} ${OPTIONS}" +done \ No newline at end of file diff --git a/scripts/ci/vs/install_bleeding.sh b/scripts/ci/vs/install_bleeding.sh deleted file mode 100644 index ed5adc56bfc..00000000000 --- a/scripts/ci/vs/install_bleeding.sh +++ /dev/null @@ -1,52 +0,0 @@ -OF_ROOT=$PWD - -SCRIPT_DIR="${BASH_SOURCE%/*}" -if [[ ! -d "$SCRIPT_DIR" ]]; then SCRIPT_DIR="$PWD"; fi -. "$SCRIPT_DIR/../../dev/downloader.sh" - -unset BITS -cd "${OF_ROOT}" -./scripts/vs/download_libs.sh -p vs --silent - -rm -rf projectGenerator -mkdir -p projectGenerator -cd projectGenerator - -echo "Downloading projectGenerator from Github Bleeding" -downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs.zip 2> /dev/null -unzip -o projectGenerator-vs.zip 2> /dev/null -#rm projectGenerator-vs.zip - -#downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs-gui.zip 2> /dev/null -#unzip projectGenerator-vs-gui.zip 2> /dev/null -#rm projectGenerator-vs-gui.zip - -cd "${OF_ROOT}" - -OFW_ROOT=$(cygpath -w "$PWD") -PG_OFX_PATH="${OF_ROOT}\\projectGenerator\\projectGenerator.exe" -PG_OF_PATH="${OF_ROOT}/projectGenerator/projectGenerator.exe" - -PGW_OFX_PATH=$(cygpath -w "$PG_OF_PATH") - -PROJECTS=( - "examples\\templates\\emptyExample" - "examples\\templates\\allAddonsExample" -) - -ADDONS=( - "" - "ofxAssimpModelLoader,ofxGui,ofxKinect,ofxNetwork,ofxOpenCv,ofxOsc,ofxSvg,ofxThreadedImageLoader,ofxXmlSettings" -) - -echo "Updating projects with PG at:${PG_OF_PATH}" - -for i in "${!PROJECTS[@]}"; do - PROJECT=${PROJECTS[i]} - ADDON=${ADDONS[i]} - OPTIONS="-o\"${OF_ROOT}\" -v -a\"$ADDON\" -p\"vs\" -t\"\" \"${OF_ROOT}\\${PROJECT}\"" - # Run the project generator executable with the combined options - echo "Updating: ${PROJECT} with:${PG_OF_PATH}" - #cmd.exe /c "${PG_OF_PATH} ${OPTIONS}" - eval "${PG_OF_PATH} ${OPTIONS}" -done \ No newline at end of file diff --git a/scripts/dev/create_package.sh b/scripts/dev/create_package.sh index 6a6353acca2..d2fdc19a49d 100755 --- a/scripts/dev/create_package.sh +++ b/scripts/dev/create_package.sh @@ -289,10 +289,10 @@ function createPackage { rm -Rf utils/fileBufferLoadingCSVExample rm -Rf 3d/modelNoiseExample rm -Rf windowing - rm -Rf input_output - rm -Rf shader - rm -Rf sound - rm -Rf threads + rm -Rf input_output + rm -Rf shader + rm -Rf sound + rm -Rf threads rm -Rf windowing fi @@ -341,41 +341,43 @@ function createPackage { #delete tutorials by now rm -Rf $pkg_ofroot/tutorials + RELEASE="${RELEASE:-latest}" + #download external dependencies cd $pkg_ofroot/ echo " Location: {$pkg_ofroot}" if [ "$pkg_platform" = "osx" ]; then - scripts/osx/download_libs.sh - scripts/emscripten/download_libs.sh -n + scripts/osx/download_libs.sh -t $RELEASE + scripts/emscripten/download_libs.sh -n -t $RELEASE elif [ "$pkg_platform" = "linux64" ]; then scripts/linux/download_libs.sh -a 64$libs_abi - scripts/emscripten/download_libs.sh -n + scripts/emscripten/download_libs.sh -n -t $RELEASE elif [ "$pkg_platform" = "linuxarmv6l" ]; then - scripts/linux/download_libs.sh -a armv6l + scripts/linux/download_libs.sh -a armv6l -t $RELEASE elif [ "$pkg_platform" = "linuxarmv7l" ]; then - scripts/linux/download_libs.sh -a armv7l + scripts/linux/download_libs.sh -a armv7l -t $RELEASE elif [ "$pkg_platform" = "linuxaarch64" ]; then - scripts/linux/download_libs.sh -a aarch64 + scripts/linux/download_libs.sh -a aarch64 -t $RELEASE elif [ "$pkg_platform" = "msys2" ]; then - scripts/msys2/download_libs.sh -a $libs_abi - scripts/emscripten/download_libs.sh -n + scripts/msys2/download_libs.sh -a $libs_abi -t $RELEASE + scripts/emscripten/download_libs.sh -n -t $RELEASE elif [ "$pkg_platform" = "vs" ]; then if [ "$libs_abi" = "" ]; then - scripts/vs/download_libs.sh + scripts/vs/download_libs.sh -t $RELEASE else - scripts/vs/download_libs.sh -a $libs_abi + scripts/vs/download_libs.sh -a $libs_abi -t $RELEASE fi - scripts/emscripten/download_libs.sh -n + scripts/emscripten/download_libs.sh -n -t $RELEASE elif [ "$pkg_platform" = "android" ]; then - scripts/android/download_libs.sh + scripts/android/download_libs.sh -t $RELEASE elif [ "$pkg_platform" = "ios" ]; then - scripts/macos/download_libs.sh + scripts/macos/download_libs.sh -t $RELEASE elif [ "$pkg_platform" = "emscripten" ]; then - scripts/emscripten/download_libs.sh -n + scripts/emscripten/download_libs.sh -n -t $RELEASE elif [ "$pkg_platform" = "macos" ]; then - scripts/osx/download_libs.sh - scripts/macos/download_libs.sh - scripts/emscripten/download_libs.sh -n + scripts/osx/download_libs.sh -t $RELEASE + scripts/macos/download_libs.sh -t $RELEASE + scripts/emscripten/download_libs.sh -n -t $RELEASE fi createProjectFiles $pkg_platform $pkg_ofroot @@ -425,9 +427,9 @@ function createPackage { export TMPDIR=$HOME/.tmp if [ "$pkg_platform" = "vs" ] || [ "$pkg_platform" = "msys2" ]; then - + -t $RELEASE # use prepackaged gui - downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs-gui.zip 2> /dev/null + downloader https://github.com/openframeworks/projectGenerator/releases/download/$RELEASE/projectGenerator-vs-gui.zip 2> /dev/null mkdir -p projectGenerator unzip -q projectGenerator-vs-gui.zip -d "projectGenerator" 2> /dev/null # if [ "$pkg_platform" = "msys2" ]; then @@ -440,7 +442,7 @@ function createPackage { fi if [ "$pkg_platform" = "osx" ] || [ "$pkg_platform" = "ios" ] || [ "$pkg_platform" = "macos" ]; then - downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-osx.zip 2> /dev/null + downloader https://github.com/openframeworks/projectGenerator/releases/download/$RELEASE/projectGenerator-osx.zip 2> /dev/null unzip -q projectGenerator-osx.zip mv projectGenerator-osx/ projectGenerator rm projectGenerator-osx.zip @@ -470,7 +472,7 @@ function createPackage { # npm run build:vs > /dev/null # mv dist/projectGenerator-win32-ia32 ${pkg_ofroot}/projectGenerator-windows # cd ${pkg_ofroot}/projectGenerator-windows/resources/app/app/ - downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/projectGenerator-vs-gui.zip 2> /dev/null + downloader https://github.com/openframeworks/projectGenerator/releases/download/$RELEASE/projectGenerator-vs-gui.zip 2> /dev/null unzip -q -d "projectGenerator" projectGenerator-vs-gui.zip 2> /dev/null rm projectGenerator-vs-gui.zip cd ${pkg_ofroot} diff --git a/scripts/dev/download_pg.sh b/scripts/dev/download_pg.sh index 903fa0aa4d3..be725d4cc6a 100755 --- a/scripts/dev/download_pg.sh +++ b/scripts/dev/download_pg.sh @@ -6,6 +6,8 @@ ARCH="" OVERWRITE=1 SILENT_ARGS="" BLEEDING_EDGE=0 +DL_VERSION=2.6.0 +TAG="" printHelp(){ cat << EOF @@ -18,6 +20,7 @@ cat << EOF If not specified tries to autodetect the platform -s, --silent Silent download progress -h, --help Shows this message + -t, --tag tag release for libraries EOF } @@ -27,14 +30,18 @@ if [[ ! -d "$SCRIPT_DIR" ]]; then SCRIPT_DIR="$PWD"; fi download(){ echo "Downloading $1" - + + REPO="nightly" if [[ $BLEEDING_EDGE = 1 ]] ; then - echo downloader https://github.com/openframeworks/projectGenerator/releases/download/bleeding/$1 $SILENT_ARGS - downloader https://github.com/openframeworks/projectGenerator/releases/download/bleeding/$1 $SILENT_ARGS - else - echo downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/$1 - downloader https://github.com/openframeworks/projectGenerator/releases/download/nightly/$1 + REPO="latest" + fi + if [[ $TAG != "" ]] ; then + REPO="$TAG" fi + + echo downloader https://github.com/openframeworks/projectGenerator/releases/download/$REPO/$1 + downloader https://github.com/openframeworks/projectGenerator/releases/download/$REPO/$1 + } # trap any script errors and exit @@ -88,6 +95,10 @@ while [[ $# -gt 0 ]]; do printHelp exit 0 ;; + -t|--tag) + TAG="$2" + shift # past argument + ;; *) echo "Error: invalid argument: $key" printHelp @@ -151,7 +162,11 @@ cd "$SCRIPT_DIR" OUTDIR=../../ if [[ $BLEEDING_EDGE = 1 ]] ; then - VER=bleeding + VER=latest +fi + +if [[ $TAG != "" ]] ; then + VER="$TAG" fi if [ "$PLATFORM" == "vs" ]; then