Skip to content

Commit

Permalink
🚀 RELEASE: Version 1.4.0 (#189)
Browse files Browse the repository at this point in the history
* Update starter.ini

* Update init-gitpod.sh

* Update .gitpod.Dockerfile

Update xdebug configuration to own config file for ioncube support
Add global composer bin folder to $PATH
Add update-ca-certificates

* Update .gitpod.Dockerfile

Add composer bin to $PATH

* Update .gitpod.Dockerfile

* Update ioncube setup

* Update README.md

Fix #153

* Update utils.sh

Fix #152

* Update before-tasks.sh

Fix #151

* Update starter.ini

Fix #149

* Update update-pma-pws-help.txt

Fix #147

* Update README.md

Fix #147

* Update start-server.sh

Fix #145

* BaseImage PHP8

* Update to PHP 8.0

* Update .gitpod.Dockerfile

* Update to PHP 8.0

Fix #155

* Fix PHP8 Path

* Fix PHP 8 Path

* Clear APT lists

* Add Workspace/Project composer bin folder to $PATH

* Add Workspace/Project composer bin folder to $PATH

* Update update-pma-pws-help.txt

* Update .gitpod.yml

* optional php7.4 install

* optional php7.4 install

* 🐛 FIX: optional php7.4 install: add sudo

* 🐛 FIX: optional php7.4 install: in progress

* 🐛 FIX: optional php7.4 install: in progress

* 🐛 FIX: optional php7.4 install: in progress

* ♻️ REFACTOR: comments and #156

* ♻️ REFACTOR: #157 in progress

* ♻️ REFACTOR: Consolidate docker layers: in progress

* 🐛 FIX: 157: consolidate docker layers: bad file names in first RUN instruction

* 🐛 FIX: 157: consolidate docker layers: debug missing tmp file

* 🤖 TEST: 157: consolidate docker layers: use /var/tmp rather than /tmp

* 🐛 FIX: 157: consolidate docker layers: swap gitpod apt-get install function for standard one that doesnt rm /tmp

* 🐛 FIX: 157: consolidate docker layers: swap gitpod apt-get install function for standard one that doesnt rm /tmp

* 🐛 FIX: 157: consolidate docker layers: swap gitpod apt-get install function for standard one that doesnt rm /tmp

* 🐛 FIX: 157: consolidate docker layers: swap gitpod apt-get install function for standard one that doesnt rm /tmp

* 👌 IMPROVE: 156 Install core, additional and optional PHP version packages

* ➕ ADD: get php major and minor version

* 🤖 TEST: force docker image build

* 🐛 FIX: log for unsupported php version in starter.ini

* 🐛 FIX: use array for package args rather than a string

* 🤖 TEST: force docker image build

* 👌 IMPROVE: log messages when swapping php versions

* 🤖 TEST: force docker image build

* 👌 IMPROVE: log messages when swapping php versions

* 💡 UPDATE COMMENTS: everytime should be two words

* 🐛 FIX: capitalize you

* 💡 UPDATE COMMENTS: capitalize the word you in first bullet point of securing phpMyAdmin

* 📖 DOC: make Technology lowercase in Welcome section

* 💡 UPDATE COMMENTS: must be run as a sudo user

* 🐛 FIX: move composer bin to /home/apena/.nvm/versions/node/v12.4.0/bin:/home/apena/go/bin:/home/apena/.local/bin:/home/apena/bin:/usr/local/bin:/home/apena/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/PROGRAM FILES/DELL/DW WLAN CARD:/mnt/c/PROGRAM FILES/INTEL/ICLS CLIENT/:/mnt/c/WINDOWS/SYSTEM32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/SYSTEM32/WBEM:/mnt/c/WINDOWS/SYSTEM32/WINDOWSPOWERSHELL/V1.0/:/mnt/c/WINDOWS/SYSTEM32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/SYSTEM32/WBEM:/mnt/c/WINDOWS/SYSTEM32/WINDOWSPOWERSHELL/V1.0/:/mnt/c/WINDOWS/SYSTEM32/OPENSSH/:/mnt/c/PROGRAMDATA/CHOCOLATEY/BIN:/mnt/c/HASHICORP/VAGRANT/BIN:/mnt/c/PROGRAM FILES (X86)/MELD/:/mnt/c/PROGRAM FILES (X86)/INTEL/INTEL(R) MANAGEMENT ENGINE COMPONENTS/DAL:/mnt/c/PROGRAM FILES/INTEL/INTEL(R) MANAGEMENT ENGINE COMPONENTS/DAL:/mnt/c/WINDOWS/SYSTEM32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/SYSTEM32/WBEM:/mnt/c/WINDOWS/SYSTEM32/WINDOWSPOWERSHELL/V1.0/:/mnt/c/WINDOWS/SYSTEM32/OPENSSH/:/mnt/c/USERS/PENAV/APPDATA/ROAMING/NVM:/mnt/c/PROGRAM FILES/NODEJS:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Users/penav/AppData/Local/Programs/Python/Python38/:/mnt/c/Users/penav/AppData/Local/Programs/Python/Python38/Scripts/:/mnt/c/Users/penav/.poetry/bin:/mnt/c/Users/penav/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/MongoDB/Server/4.2/bin:/mnt/c/Program Files/heroku/bin:/mnt/c/Users/penav/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin:/mnt/c/Users/penav/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Users/penav/AppData/Local/Programs/Microsoft VS Code/bin:/usr/local/go/bin:/home/apena/.config/yarn/global/node_modules/.bin block above setting of initialized flag

* move composer bin to PATH block above setting of initialized flag

* ➕ ADD: dynamic xdebug install

* 🐛 FIX: typos/syntax errors

* 🤖 TEST: force docker image build

* 🐛 FIX: generate xdebug conf

* 🤖 TEST: force docker image build

* 🐛 FIX: xdebug conf not generating

* 🤖 TEST: force docker image build

* 🐛 FIX: xdebug.ini name

* 🤖 TEST: hardcoded php version

* 🤖 TEST: force docker image build

* 🤖 TEST: reverting code

* 🐛 FIX: bad log syntax and set phpize specifically

* 🤖 TEST: install-xdebug.sh

* 🐛 FIX: missing phpize

* 🤖 TEST: force docker image build

* 🤖 TEST: hardcoded php version to 7.4 for now

* 🤖 TEST: hardcode phpize path for php7.4 for now

* ➕ ADD: libapache2-mod-php7.4 and --set php-config

* 🤖 TEST: force docker image build

* ♻️ REFACTOR: #156

* ⚰️ REMOVE: extraneous file

* ♻️ REFACTOR: #156

* 🤖 TEST: force docker image build

* 🤖 TEST: Gitpod us cluster is unstable, forcing docker image build

* 🤖 TEST: force docker image build

* 🤖 TEST: force docker

* ♻️ REFACTOR: #156

* Add GnuPG Support

* Update .gitpod.Dockerfile

* Add Log Notice and Description

Fix #170

* 🐛 FIX: rebuild package list

* 🤖 TEST: build docker image

* 🐛 FIX: try conditionally disabling php module for apache before installing php

* 🤖 TEST: docker image build

* 🤖 TEST: trying to properly purge gp installed php

* 🤖 TEST: docker

* 🤖 TEST: trying to properly purge gp installed php

* 🤖 TEST: docker

* 🐛 FIX: php-fpm conf path

* 🤖 TEST: docker

* 🐛 FIX: apache conf getting overwritten by potential php install

* 🐛 FIX: php-fpm.conf path

* 🤖 TEST: docker

* ♻️ REFACTOR: autogeneration of php-fpm

* 🤖 TEST: docker

* 🐛 FIX: set apache conf

* 🐛 FIX: bad tabs in php-fpm.conf generation

* 🤖 TEST: docker

* ♻️ REFACTOR: apache configuration

* 🐛 FIX: #172

* 🤖 TEST: docker

* 🐛 FIX: typo

* 🤖 TEST: #173

* 🤖 TEST: debugging #171

* 🤖 TEST: docker

* 🐛 FIX: #174

* 🐛 FIX: trim any potential leading or tailing whitepsace from the parsed ppa value

* 🤖 TEST: docker

* 🤖 TEST: #174 again

* 🤖 TEST: docker

* 🐛 FIX: #148

* 🐛 FIX: log messages for #171

* ♻️ REFACTOR: #165 and #170

* 🐛 FIX: #158

* 🐛 FIX: bump hardcoded gls version in preparation for v1.4 release

* 🐛 FIX: #168

* 🐛 FIX: #161 and log messages for #168 and autogeneration of php-fpm.conf

* 🐛 FIX: #161

* 🐛 FIX: #168

* 🤖 TEST: #168

* 🐛 FIX: comment

* 🤖 TEST: #168

* 🤖 TEST: #168

* 🐛 FIX: move autogeneration of files as per starter.ini to after rsync

* 🐛 FIX: shorten log message gor phpinfo.php autogenaration

* 🐛 FIX: parse .vscode/settings.json first

* Show only stderr for gpg

* 💡 UPDATE COMMENTS: improve log msg

* 🐛 FIX: #164

* Update feature-request-.md

Fix hidden comment issue

* 🐛 FIX: 3614991

* 📖 DOC: #160

* 🐛 FIX: #156

* 🤖 TEST: docker

* 📖 DOC: #173

* 🤖 TEST: docker

* 🐛 FIX: #156 for ioncube

* 🤖 TEST: docker

* 🤖 TEST: ioncube install, TODO: swap this back to the default of 0 after testing

* 🤖 TEST: do not install ioncube if php version is > 7.4

* ♻️ REFACTOR: remove generation of php-fpm conf

* ♻️ REFACTOR: generation of php-fpm.conf for #156

* 🤖 TEST: force docker

* ⚰️ REMOVE: autogeneration of php-fpm.conf

* 🤖 TEST: force docker

* 🐛 FIX: proper exit

* 🤖 TEST: force docker

* 🐛 FIX: get current php version

* ♻️ REFACTOR: move autogen of php-fpm.conf

* ♻️ REFACTOR: ioncube install for php 7.4

* 💡 UPDATE COMMENTS: PHP ppa comment

* 🤖 TEST: force docker

* 🐛 FIX: bump npm install to 8.3.2

* 🐛 FIX: add phpfpm install for php versions > 7.4

* 🤖 TEST: force docker

* ♻️ REFACTOR: move invalidate cache back to the bottom of the file

* 🐛 FIX: path to utils.sh

* 🤖 TEST: force docker

* 🐛 FIX: log to workspace-image.log when using existing gitpodlatest version of php

* 🐛 FIX: php version comparison for installing phpfpm

* 🤖 TEST: install php 7.4

* 🤖 TEST: invalid value for php version

* 🤖 TEST: force docker

* 🐛 FIX: fallback routine for #156

* 🤖 TEST: force docker

* 🤖 TEST: #156 install php 7.4 explicity

* 🤖 TEST: force docker

* 🐛 FIX: restore default value for ioncube install to 0

* 🤖 TEST: force docker

* 📖 DOC: #180

* 📖 DOC: #181

* ♻️ REFACTOR: #170

* 🐛 FIX: log gpg_key_id

* 🤖 TEST: gitpod with git signed commit

* 🐛 FIX: unset GPG_KEY once successful

* 🤖 TEST: test gpg trusted key

* 🤖 TEST: gpg signed commit

* 🐛 FIX: #170 swap git email to env GPG_MATCH_GIT_TO_EMAIL if present

* 🐛 FIX: typo

* 🤖 TEST: email match for gpg

* 🐛 FIX: make gpg key logs silent except for errors

* 🐛 FIX: #170 Support GPG_AUTO_ULTIMATE_TRUST to automagically give ultimate trust to a GPG_KEY

* ⚰️ REMOVE: extraneous space in GPG_AUTO_ULTIMATE_TRUST conditional

* 🐛 FIX: #170 make success a slient log for GPG_AUTO_ULTIMATE_TRUST

* 🐛 FIX: reduce verbosity of all log messages

* 🐛 FIX: #170 log improper use of GPG env vars

* ⚰️ REMOVE: redundant file

* 🤖 TEST: remove hotfix #140

* 🤖 TEST: #185

* 🤖 TEST: #185

* 🐛 FIX: #188

* 🐛 FIX: #185

* 📖 DOC: #183

* ⚰️ REMOVE: test file

* 📖 DOC: dev-qa fix for #183

* 👌 IMPROVE: Documentation formatting, broken links and #176

Co-authored-by: Björn Strausmann <bjoern@strausmann.net>
  • Loading branch information
apolopena and strausmann committed Jan 28, 2022
1 parent a26165e commit 861ac2b
Show file tree
Hide file tree
Showing 26 changed files with 724 additions and 256 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request-.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ assignees: ''
<!-- A clear and concise description of what you want to happen. -->

## Constraints and Assumptions
<! -- Any constraints and/or assumption relevant for the development and use of this feature? -->
<!-- Any constraints and/or assumption relevant for the development and use of this feature? -->

## Alternatives or Workarounds
<!-- A concise description of any alternative solutions or features you've considered or used. -->
Expand Down
83 changes: 43 additions & 40 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,55 @@ FROM gitpod/workspace-mysql

USER gitpod

# Copy required files to /tmp
COPY --chown=gitpod:gitpod .gp/bash/update-composer.sh \
starter.ini \
.gp/conf/apache/apache2.conf \
.gp/conf/nginx/nginx.conf \
.gp/bash/.bash_aliases \
.gp/bash/php.sh \
.gp/bash/install-core-packages.sh \
.gp/bash/install-project-packages.sh \
.gp/bash/install-xdebug.sh \
.gp/bash/update-composer.sh \
.gp/bash/utils.sh \
.gp/bash/scaffold-project.sh \
.gp/snippets/server-functions.sh \
.gp/snippets/browser-functions.sh \
.gp/bash/bin/hot-reload.sh \
/tmp/

# Create log files and move required files to their proper locations
RUN sudo touch /var/log/workspace-image.log \
&& sudo chmod 666 /var/log/workspace-image.log \
&& sudo touch /var/log/workspace-init.log \
&& sudo chmod 666 /var/log/workspace-init.log \
&& sudo touch /var/log/xdebug.log \
&& sudo chmod 666 /var/log/xdebug.log

RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections \
&& sudo apt-get update -q \
&& sudo apt-get -y install php7.4-fpm rsync grc shellcheck \
&& sudo apt-get clean

COPY --chown=gitpod:gitpod .gp/conf/xdebug/xdebug.ini /tmp
RUN wget http://xdebug.org/files/xdebug-3.0.4.tgz \
&& tar -xvzf xdebug-3.0.4.tgz \
&& cd xdebug-3.0.4 \
&& phpize \
&& ./configure --enable-xdebug \
&& make \
&& sudo cp modules/xdebug.so /usr/lib/php/20190902/xdebug.so \
&& sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20190902/xdebug.so\n[XDebug]\nxdebug.client_host = 127.0.0.1\nxdebug.client_port = 9009\nxdebug.log = /var/log/xdebug.log\nxdebug.mode = debug\nxdebug.start_with_request = trigger\n' >> /etc/php/7.4/cli/php.ini" \
&& sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20190902/xdebug.so\n[XDebug]\nxdebug.client_host = 127.0.0.1\nxdebug.client_port = 9009\nxdebug.log = /var/log/xdebug.log\nxdebug.mode = debug\nxdebug.start_with_request = trigger\n' >> /etc/php/7.4/apache2/php.ini" \
&& sudo cp /tmp/xdebug.ini /etc/php/7.4/mods-available/xdebug.ini \
&& sudo ln -s /etc/php/7.4/mods-available/xdebug.ini /etc/php/7.4/fpm/conf.d

COPY --chown=gitpod:gitpod .gp/bash/update-composer.sh /tmp
RUN sudo bash -c ". /tmp/update-composer.sh" && rm /tmp/update-composer.sh
&& sudo chmod 666 /var/log/xdebug.log \
&& sudo cp /tmp/apache2.conf /etc/apache2/apache2.conf \
&& sudo mv /tmp/nginx.conf /etc/nginx/nginx.conf \
&& sudo mv /tmp/.bash_aliases /home/gitpod/.bash_aliases \
&& sudo mv /tmp/server-functions.sh /home/gitpod/.bashrc.d/server-functions \
&& sudo mv /tmp/browser-functions.sh /home/gitpod/.bashrc.d/browser-functions \
&& sudo mv /tmp/hot-reload.sh /usr/local/bin/hot-reload

# gitpod trick to bypass the docker caching mechanism for all lines below this one
# just increment the value each time you want to bypass the cache system
ENV INVALIDATE_CACHE=184
# Install and configure php and php-fpm as specified in starter.ini
RUN sudo bash -c ". /tmp/php.sh" && rm /tmp/php.sh

COPY --chown=gitpod:gitpod .gp/conf/apache/apache2.conf /etc/apache2/apache2.conf
COPY --chown=gitpod:gitpod .gp/conf/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --chown=gitpod:gitpod .gp/bash/.bash_aliases /home/gitpod
COPY --chown=gitpod:gitpod .gp/bash/utils.sh /tmp
COPY --chown=gitpod:gitpod starter.ini /tmp
COPY --chown=gitpod:gitpod .gp/bash/scaffold-project.sh /tmp
RUN sudo bash -c ". /tmp/scaffold-project.sh" && rm /tmp/scaffold-project.sh
# Install core packages for gitpod-laravel-starter
RUN sudo bash -c ". /tmp/install-core-packages.sh" && rm /tmp/install-core-packages.sh

# Install any user specified packages for the project
RUN sudo bash -c ". /tmp/install-project-packages.sh" && rm /tmp/install-project-packages.sh

# Download, compile, install and configure xdebug from source
RUN sudo bash -c ". /tmp/install-xdebug.sh" && rm /tmp/install-xdebug.sh

# Aliases
COPY --chown=gitpod:gitpod .gp/snippets/server-functions.sh /tmp
COPY --chown=gitpod:gitpod .gp/snippets/browser-functions.sh /tmp
RUN cp /tmp/server-functions.sh ~/.bashrc.d/server-functions \
&& cp /tmp/browser-functions.sh ~/.bashrc.d/browser-functions
# Update composer. TODO: https://github.com/apolopena/gitpod-laravel-starter/issues/159
RUN sudo bash -c ". /tmp/update-composer.sh" && rm /tmp/update-composer.sh

# Scaffold the Laravel project
RUN sudo bash -c ". /tmp/scaffold-project.sh" && rm /tmp/scaffold-project.sh

# Customs cli's and user scripts for /usr/local/bin
COPY --chown=gitpod:gitpod .gp/bash/bin/hot-reload.sh /usr/local/bin
RUN sudo mv /usr/local/bin/hot-reload.sh /usr/local/bin/hot-reload
# Force the docker image to build by incrementing this value
ENV INVALIDATE_CACHE=226
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ tasks:

vscode:
extensions:
- felixfbecker.php-debug@1.14.12:e02f0fde2ddd444c182ba531e8b09afd
- felixfbecker.php-debug
69 changes: 65 additions & 4 deletions .gp/bash/before-tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# before-tasks.sh
# Description:
# Tasks that should be run everytime the worspace is created or started.
# Tasks that should be run every time the workspace is created or started.
#
# Notes:
# Gitpod currently does not persist files in the home directory so we must write them
Expand All @@ -18,26 +18,87 @@
# Some rake tasks are dynamic and depend on the configuration in starter.ini
if [[ $(bash .gp/bash/utils.sh parse_ini_value starter.ini github-changelog-generator install) ]]; then
msg="Writing rake tasks"
log_silent "$msg" &&
if bash .gp/bash/init-rake-tasks.sh; then
log_silent "SUCCESS: $msg"
else
log -e "ERROR: $msg"
fi
fi

git status
# Aliases for git
msg="git aliases have been written"
bash .gp/bash/utils.sh add_file_to_file_after "\\[alias\\]" .gp/snippets/git/emoji-log ~/.gitconfig &&
bash .gp/bash/utils.sh add_file_to_file_after "\\[alias\\]" .gp/snippets/git/aliases ~/.gitconfig &&
log_silent "$msg" &&
log_silent "try: git a or: git aliases to see what is available."

# BEGIN: Enable GPG key to sign Git commits.
# Error handling for improper use of GPG environment variables
err_msg_prefix1="A GPG_KEY was found but it's corresponding GPG_KEY_ID was not."
err_msg_prefix2="A GPG_KEY_ID was found but it's corresponding GPG_KEY was not."
err_msg_suffix="Git commits will not be signed."
[[ -n $GPG_KEY && -z $GPG_KEY_ID ]] &&
log -e "ERROR: $err_msg_prefix1 $err_msg_suffix"
[[ -n $GPG_KEY_ID && -z $GPG_KEY ]] &&
log -e "ERROR: $err_msg_prefix2 $err_msg_suffix"
# Main GPG key logic
if [[ -n $GPG_KEY && -n $GPG_KEY_ID ]]; then
gpg_conf_path=~/.gnupg/gpg.conf
msg="Enabling Git commit signing for GPG key id: $GPG_KEY_ID"
gpg -q --batch --import <(echo "$GPG_KEY" | base64 -d) &&
echo 'pinentry-mode loopback' >> "$gpg_conf_path" &&
git config --global user.signingkey "$GPG_KEY_ID" &&
git config commit.gpgsign true
ec=$?
if [[ $ec -eq 0 ]]; then
log_silent "SUCCESS: $msg"
# Change the git email if the user needs it (ensures the commit is marked as 'Verified')
if [[ -n $GPG_MATCH_GIT_TO_EMAIL ]]; then
msg="Setting user.email in ~/.gitconfig to $GPG_MATCH_GIT_TO_EMAIL"
if git config --global user.email "$GPG_MATCH_GIT_TO_EMAIL"; then
log_silent "SUCCESS: $msg"
else
log -e "ERROR: $msg"
fi
fi
# Ultimately trust the key, bump to lowercase and check the value of the directive
if [[ $(echo "$GPG_AUTO_ULTIMATE_TRUST" | tr '[:upper:]' '[:lower:]') == yes ]]; then
msg="Automagically giving ultimate trust to GPG_KEY_ID: $GPG_KEY_ID"
# Prepend the key id as a trusted hex and update the local database with a silent arbitrary gpg call
echo -e ""trusted-key 0x"$GPG_KEY_ID""\n$(cat $gpg_conf_path)" > "$gpg_conf_path" &&
gpg --list-keys &> /dev/null
ec=$?
if [[ $ec -eq 0 ]]; then
log_silent "SUCCESS: $msg"
else
log -e "ERROR: $msg"
fi
fi
else
log -e "ERROR: $msg"
fi
fi
# END: Enable GPG key to sign Git commits.

# Auto activate intelephense if license key is available
if [[ -n $INTELEPHENSE_LICENSEKEY ]]; then
msg="creating $HOME/intelephense/licence.txt"
log_silent "INTELEPHENSE_LICENSEKEY environment variable found, $msg"
mkdir -p "$HOME/intelephense" &&
echo "$INTELEPHENSE_LICENSEKEY" > "$HOME/intelephense/licence.txt" &&
ec=$?
if [[ $ec -eq 0 ]]; then
log "SUCCESS: $msg"
else
log -e "ERROR: $msg"
fi
fi

# Restore files marked as persistant such as workspace-init.log
# See persist_file in bash/helpers.sh for how the system works
# Keep this block at the bottom of the file so that any logging from this
# script is only written to file upon initialization! Otherwise workspace-init.log
# will get written to from this script upon every workspace restart.
if [[ $(bash .gp/bash/helpers.sh is_inited) == 1 ]]; then
bash .gp/bash/helpers.sh restore_persistent_files "$GITPOD_REPO_ROOT"
fi
fi
110 changes: 0 additions & 110 deletions .gp/bash/examples/change-passwords.sh

This file was deleted.

6 changes: 3 additions & 3 deletions .gp/bash/examples/init-react-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ all_zeros='^[0]+$'
task_msg="Setting up React example: Questions and Answers"

log "$task_msg"
curl -LJO https://github.com/apolopena/qna-demo-skeleton/archive/refs/tags/1.1.0.tar.gz
curl -LJO https://github.com/apolopena/qna-demo-skeleton/archive/refs/tags/1.1.1.tar.gz
exit_codes+=($?)
tar --overwrite -xvzf qna-demo-skeleton-1.1.0.tar.gz --strip-components=1
tar --overwrite -xvzf qna-demo-skeleton-1.1.1.tar.gz --strip-components=1
exit_codes+=($?)
rm qna-demo-skeleton-1.1.0.tar.gz
rm qna-demo-skeleton-1.1.1.tar.gz
exit_codes+=($?)

if [[ $(echo "${exit_codes[@]}" | tr -d '[:space:]') =~ $all_zeros ]]; then
Expand Down
8 changes: 3 additions & 5 deletions .gp/bash/examples/init-react-typescript-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ declare -a exit_codes=()
task_msg="Downloading React Typescript example: Questions and Answers"

log "$task_msg"
curl -LJO https://github.com/apolopena/qna-typescript-demo-skeleton/archive/refs/tags/1.1.0.tar.gz
curl -LJO https://github.com/apolopena/qna-typescript-demo-skeleton/archive/refs/tags/1.1.1.tar.gz
exit_codes+=($?)
tar --overwrite -xvzf qna-typescript-demo-skeleton-1.1.0.tar.gz --strip-components=1
tar --overwrite -xvzf qna-typescript-demo-skeleton-1.1.1.tar.gz --strip-components=1
exit_codes+=($?)
rm qna-typescript-demo-skeleton-1.1.0.tar.gz
rm qna-typescript-demo-skeleton-1.1.1.tar.gz
exit_codes+=($?)

if [[ $(echo "${exit_codes[@]}" | tr -d '[:space:]') =~ ^[0]+$ ]]; then
Expand All @@ -29,5 +29,3 @@ else
fi




0 comments on commit 861ac2b

Please sign in to comment.